Acquire a token

You can acquire an API token using Client ID and Client Secret from Tango portal. With client ID and Client Secret, use thePOST {URI}/oauth/token endpoint (at least once every 24 hours) to send an API request and get a new token.

See how to get the client ID and client secret: Secure a connection with OAuth 2.0.

📘

Note:

  • You can get unlimited tokens. There's no restrictions in the number of tokens.
  • An access token can only be used for 24 hours once created. Fetch a new token at least once every 24 hours to authenticate calls. New tokens can be generated using the same client credentials and service accounts, or the updated credentials.

Use the following endpoint to request a new OAuth token:

EndpointDescription
POST {URI}/oauth/tokenTo acquire a new oauth token.

The following parameters can be used in your request:

ParameterData typeRequirementDescription
client_idstringrequiredYour client ID created in the Tango portal under OAuth client credentials.
client_secretstringrequiredYour client secret created in the Tango portal under OAuth client credentials.
scopestringrequiredList of space-separated OAuth scopes, static, the value is always raas.all.
audiencestringrequiredAudience for the token, static, the value is always https://api.tangocard.com/.
grant_typestringrequiredType of the OAuth flow in progress, static, the value is always client_credentials.

Here's a 200 OK example:

{
  "access_token": "string",
  "scope": "string",
  "expires_in": 0,
  "token_type": "Bearer"
}

The response message for this endpoint is. For details, see i18nkey codes and their error messages:

  • 200 OK
  • 400 Bad request
  • 401 Unauthorized

© 2025 Tango API are provided by Tango, a division of BHN, Inc.