Skip to navigation

Create access token

Exchanges an API key for an access token that is valid for at most 30 minutes. Send the API key as Authorization: Bearer <api key>. This is the only operation that accepts an API key. To refresh, exchange the API key again; an access token never creates another access token.

The API key must be enabled for this API version. Keep the API key on a trusted server and never ship it in a browser or mobile app.

Every request is checked against the API key’s IP allowlist. A platform API key is also checked against your platform’s IP allowlist.

Authentication

AuthorizationBearer

API key. Accepted only by POST /access-token.

Headers

X-Request-IdstringOptionalformat: "^[A-Za-z0-9._:-]+$"1-128 characters

Your own correlation ID for this request. It is recorded with the request. The X-Request-Id response header is always generated by the server.

Request

No members. Send no body or an empty JSON object.

Response headers

X-Request-Idstringformat: "uuid"
Unique ID of this request. Quote it when you contact support.
RateLimitstringOptional

Remaining budget for each rate limit policy, for example "burst"; r=57; t=6 (requests remaining and seconds until the window resets).

RateLimit-PolicystringOptional

The rate limit policies applied to this request, for example "burst"; q=60; w=10 (requests allowed per window of seconds).

Response

The access token.
tokenstring

The access token. Send it as Authorization: Bearer <token>. Never log it or put it in a URL.

tokenTypeenum

Always Bearer.

Allowed values:
expiresIninteger1-1800
Seconds until the token expires.
expiresAtinteger>=0
When the token expires, in Unix epoch milliseconds.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
413
Content Too Large Error
415
Unsupported Media Type Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error