Create an access token for the authenticated user.
Version: v4
Request Type: POST
Endpoint:
/v4/apiAccessTokens |
Request Header:
Request Body:
{ "lifetimeSeconds": 100, "description": "My 100-second token" } |
Response Status Code - Success: 201 - Created
NOTE: If you receive a |
Response Body Example:
{ "tokenValue": "eyJ0b2tlbklkIjoiYmFiOTA4ZjctZGNjMi00OTYyLTg1YmQtYzFlOTZkMGNhY2JkIiwic2VjcmV0IjoiOWIyNjQ5MWJiODM4ZWY0OWE1NzdhYzYxOWEwYTFkNjc4ZmE4NmE5MzBhZWFiZDk3OGRlOTY0ZWI0MDUyODhiOCJ9", "tokenInfo": { "tokenId": "bab908f7-dcc2-4962-85bd-c1e96d0cacbd", "description": "My 100-second token", "expiredAt": "2019-01-16T00:06:41.743Z", "lastUsed": null, "createdAt": "2019-01-16T00:05:01.743Z" } } |
Reference
Request reference:
Property | Description |
---|---|
lifetimeSeconds | Lifetime in seconds for the access token. Set this value to |
description | User-friendly description of the token |
Property | Description | |
---|---|---|
tokenValue | The token itself.
| |
tokenInfo.tokenId | Internal identifier for the token.
| |
tokenInfo.description | User-friendly description for the access token | |
tokenInfo.expiredAt | Timestamp for when the access token expires. A | |
tokenInfo.lastUsed | Timestamp for when the access token was last used. A | |
tokenInfo.createdAt | Timestamp for when the access token was created |