Skip to main content
POST
Request or refresh an OAuth token

Authorizations

Authorization
string
header
required

Security scheme for requesting and refreshing tokens using the /auth/token endpoint. Uses basic authentication with client_id as the username and client_secret as the password.

Body

application/x-www-form-urlencoded

Request or refresh token

grant_type
enum<string>
required
Available options:
refresh_token,
client_credentials
Example:

"refresh_token"

client_id
string

A client specific identifier provided by Narrative

Example:

"zzzzzzzzzzzzz"

refresh_token
string

The token used to refresh the API session. Required if grant_type is refresh_token

Example:

"yyyyyyyyyyy"

Response

200 - application/json

Refreshed token

access_token
string
required

The access token

Example:

"xxxxxxxxxxx"

access_token_expires_in
integer
required

The TTL of the access_token in seconds

Example:

3600

refresh_token
string
required

The refresh token

Example:

"yyyyyyyyyyy"

refresh_token_expires_in
integer
required

The TTL of the refresh_token in seconds

Example:

14400