Skip to navigation

Create a token

Exchanges your client credentials for an access token. This endpoint is itself unauthenticated, and accepts a JSON body rather than the form-encoded body described by RFC 6749.

Headers

X-Studies-Api-VersionstringOptional

Request

The credentials issued for your OAuth client.
grant_type"client_credentials"Required

OAuth2 grant type; must be ‘client_credentials’.

client_idstringRequiredformat: "uuid"
Your application's Client ID.
client_secretstringRequired>=1 character
Your application's Client Secret.

Response headers

X-RateLimit-LimitintegerOptional
The number of requests permitted in the current rate limit window.
X-RateLimit-RemainingintegerOptional

The number of requests still available in the current rate limit window. When several limits apply, this reflects the per-API-key limit, so a request can be rejected while this value is above zero.

X-RateLimit-ResetintegerOptional
The number of seconds until the current rate limit window resets.

Response

An access token was issued.
token_type"Bearer"

How the token must be presented; always ‘Bearer’.

expires_inlong
Lifetime of the access token, in seconds from issue.
access_tokenstring
The signed JWT access token.

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error