---
title: "Get oauth2 token"
method: POST
path: "/v2/auth/oauth2-token"
tags: ["Authentication"]
---

# Get oauth2 token

`POST /v2/auth/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 %}

## Response `200`

OK

- OAuthTokenResponse
  - `access_token` string, required — The token to be used in subsequent API calls made to the Spotnana platform.
  - `expires_in` integer — The length of time (in seconds) for which the access token is valid.
  - `token_type` string, required — A case-insensitive value specifying the method of using the access token issued, as specified in Section 7.1 of [RFC6749].
  - `refresh_token` string — 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`.
  - `scope` string — 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.

## Other responses

- `403` — Forbidden

---

[API](https://skmtc.dev/spotnana/apis/auth-api.md) · [All operations](https://skmtc.dev/spotnana/apis/auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/spotnana/auth-api/revisions/555ac64fcc19/schema)
