Request
Header
Name | Description | Example | Required |
---|---|---|---|
x-api-key | A unique key issued during onboarding | 6rprzP8q6b7ulYcLsKz2 | Yes |
Content-Type | The type of the content. By default, 'application/json' | application/json | No |
Body
The endpoint supports the generation of different tokens.
Key | Description | Example | Required |
---|---|---|---|
consumer_id | Required for | CN233433552 | No |
product_request_id | Required for | IBV420CE406A15E1EBF3B43 | No |
type | Type of token that will be generated. | widget_token | No |
consumer_id
(string)
Response
a) Access Token Issued - HTTP 200
Name | Description | Example | Type |
---|---|---|---|
access_token | A valid access token | eyJhbGciOiJIUzI1NiJ9 | String |
expires_in | The length of time in seconds that the access token is valid for. | 3600 | String |
message | The details of the failure | Invalid credentials | String |
b) Bad Request - HTTP 400
Name | Description | Example | Type |
---|---|---|---|
message | The details of the failure | Invalid credentials | String |
fields | Detailed error description specified by field | {...} | Object |
c) Unauthorized - HTTP 401
Name | Description | Example | Type |
---|---|---|---|
error | The details of the failure | Invalid credentials | String |
Examples for status code
{
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJjbGllbnRfaWQiOiI1NWUwNmNjMmFhMzVjZWI1ZmE1OSIsImNvbnN1bWVyX2lk
IjoiZGVtbzEyMzQifQ.lnICYcqNx3Ia5WqfifX_orvnyKW8vNjeltSnYRNvwGA",
"expires_in": 3600
}
{
"message": "Validation error",
"fields": {
"product_request_id": [
"is required for generation of embedded report token"
]
}
}
{
"error": "Invalid token"
}