Get access token

View as MarkdownOpen in Claude
Use your Sigma client ID and secret with this endpoint to generate an access token valid for one hour, or to refresh your token. You can then use the access token to authenticate requests made to the Sigma API. To make any API call with the Sigma API, including calls from the API documentation, you must have a valid bearer token. To generate a token, you must have a valid **Client ID** and **Secret**. See [Generate Sigma API client credentials](generate-client-credentials). You make all API calls to a specific URL that corresponds to the cloud where your Sigma environment is hosted. Set the **Base URL** to the relevant URL for your environment. For details, see [Identify your API request URL](get-started-sigma-api#identify-your-api-request-url). Generate a token by sending a POST request to this `/v2/auth/token` endpoint, or use the **Try It!** option on this page. ### Usage notes - The API token is valid for 1 hour. When the token expires, an endpoint response returns an unauthorized error. - Refresh your access token before it expires using the `refresh_token` option. - If your client credentials are owned by a user assigned the Admin account type, you can generate an access token as a specific user using impersonation.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Request

The request body.
grant_typestringRequired

Set to client_credentials to retrieve an access token.

client_idstringRequired
Your API client ID.
client_secretstringRequired
Your API client secret.

Response

The response body.
access_tokenstring
Token used to access the API and make requests.
token_typestring
The type of token issued.
expires_ininteger
The number of seconds until the access token expires.
refresh_tokenstring
Refresh token used to refresh the access token.