Authentication

Get oauth2 token

Get oauth2 token using the client credentials. {% admonition type="warning" %} Note: API calls to the /v2/auth/oauth2-token and /get-auth-token (legacy) endpoints are rate limited. We recommend reusing the existing tokens until they expire. {% /admonition %}

post/v2/auth/oauth2-token

Request

  • Base URL
    https://api-ext-sboxmeta.partners.spotnana.com
  • Auth
    none required

Request body application/x-www-form-urlencoded

grant_typestring required

Supported values are client_credentials and urn:ietf:params:oauth:grant-type:token-exchange.

client_idstring required

Identifier for the API user.

client_secretstring required

Password

audiencestring

Identifies the API being accessed in Spotnana.

subject_tokenstring

A security token that represents the identity of the entity on whose behalf the request is being made.

subject_token_typestring

Indicates the type of the subject_token used for token exchange. This field supports the valid types as per the OAUTH 2.0 security framework.

scopestring

The list of space-delimited, case-sensitive strings, as defined in Section 3.3 of RFC6749 OAuth 2.0 framework, that allow the client to specify the desired scope of the requested security token in the context of the service or resource where the token will be used.

Example request

{
  "audience": "https://apis.spotnana.com/v2"
}

Response

OK

access_tokenstring required

The token to be used in subsequent API calls made to the Spotnana platform.

expires_ininteger

The length of time (in seconds) for which the access token is valid.

token_typestring required

A case-insensitive value specifying the method of using the access token issued, as specified in Section 7.1 of [RFC6749].

refresh_tokenstring

Used to fetch a new access token when the existing token expires. The refresh token will not be available if the grant_type is client_credentials.

scopestring

The list of space-delimited, case-sensitive strings, as defined in Section 3.3 of [RFC6749], that allow the client to specify the desired scope of the requested security token in the context of the service or resource where the token will be used.

Example response

{
  "token_type": "Bearer"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.