---
title: "Authenticate User"
method: POST
path: "/oauth/token"
tags: ["OAuth2"]
---

# Authenticate User

`POST /oauth/token`

## Request

- Base URL: `https://api.carbonvoice.app`
- URL: `https://api.carbonvoice.app/oauth/token`
- Auth: none declared

## Request body

- Oauth2TokenRequest
  - `redirect_uri` string, required: The URL to which Auth will redirect the browser after authorization has been granted by the user.
  - `code` string, required: The authorization code when grant_type is set to "authorization_code"
  - `grant_type` string, required: The type of grant you are requesting, "client_credentials","refresh_token","authorization_code"
  - `refreshToken` string
  - `code_verifier` string: The code verifier when grant_type is set to "authorization_code" and code_challenge_method

## Response `200`

- OAuth2Response
  - `access_token` string, required: The generated access token
  - `token_type` string, required: The type of token, in our case should always be "bearer"
  - `refresh_token` string, required: The generated refresh token
  - `expires_in` number, required: Number of seconds until the access token expires
  - `refresh_token_exp` number, required: The list of the permissions (tpApps) that the application requests.
  - `scope` string, required: Scopes you are allowed to use if any requested
  - `user_id` string: The authenticated user id

---

[API](https://skmtc.dev/carbonvoice/apis/carbon-voice-api.md) · [All operations](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/revisions/b91c5c845122?raw)
