GET Access Token
To invoke an API call, you must have a valid Access Token generated using the valid application credentials

Get API Key and API Secret

Please log in to https://app.marsview.ai to get your apiKey and apiSecret
Note that only one set of API keys can be active for a given account and resetting the Credentials will make the old appID and appSecret invalid
To create a new set of API credentials goto Settings > Account Details > API Credentials and click on Reset Credentials.
The apiKey and apiSecret are automatically created during account creation, these values can be accessed under the Settings > Account Details > API Credentialssection.

Generating API Access Token

Using the apiKey and the apiSecret we can generate a accessToken which will be used to authenticate all the requests to the Speech Analytics API Bundle.
Note that the accessToken generated will be valid for 3600 seconds. Post which another accesstoken has to be generated.
post
https://api.marsview.ai
/cb/v1/auth/create_access_token
Generate API Token

Example Request: How to generate API Token

Shown below is a code snippet to generate an API token.
CURL
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/auth/create_access_token' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"apiKey": "Insert API Key",
5
"apiSecret": "Insert API Secret",
6
"userId": "[email protected]"
7
}'
Copied!

Example Response

Shown below is a sample JSON response from the above request.
1
{
2
"status": true,
3
"data": {
4
"accessToken": "DummyAccessToken",
5
"expiresIn": 3600,
6
"tokenType": "Bearer"
7
}
8
}
Copied!
Last modified 3mo ago