Skip to content

Retrieve a token

GET
/v1/tokens/{token_id}/

Returns the token with the current permissions of the user, and extends it by its expiration period.

Authorization

apiKey
headerAuthorizationBasic <token>

HTTP Basic authentication with your API key or the id of a token as the username and an empty password.

Path Parameters

token_id*string

The id of the token.

Response Body

The token.

application/json
  1. response
id?string

The token. Send it as the username of HTTP Basic authentication.

created?string
Formatdate-time
merchant_id?string
Formatuuid
account_id?string

The ID of the user.

Formatuuid
email?string
legal_name?string
expiration?string

When the token expires, unless it's used before.

Formatdate-time
expiration_period?string

How long the token lasts after its last use, as an ISO 8601 duration.

status?string
Value in"active""inactive""invalid""expired"
permissions?

Path permissions, see Permissions.

field_permissions?

The field permissions of the user, when it has any.

allowed_project_ids?array<string>

The projects the user may read.

trusted_token?string

The new trusted token, when you sent generate_trusted_token or trusted_token.

curl -X GET 'https://api.example.com/v1/tokens/4c0ffee5c0ffee5c0ffee5c0ffee5c0f/' \  --user "$API_KEY:"
{  "id": "string",  "created": "2019-08-24T14:15:22Z",  "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",  "email": "string",  "legal_name": "string",  "expiration": "2019-08-24T14:15:22Z",  "expiration_period": "string",  "status": "active",  "permissions": {    "property1": {      "GET": true,      "POST": true,      "PUT": true,      "DELETE": true,      "*": true    },    "property2": {      "GET": true,      "POST": true,      "PUT": true,      "DELETE": true,      "*": true    }  },  "field_permissions": {},  "allowed_project_ids": [    "string"  ],  "trusted_token": "string"}