---
title: "Create an OAuth Token"
method: POST
path: "/oauth/tokens"
---

# Create an OAuth Token

`POST /oauth/tokens`

## Request body

- CreateAnOauthTokenParameters
  - `client_id` string — The public identifier for your application.
  - `client_secret` string — The secret that confirms you own the application. This is redundant given that the request is made with your API key but it's a required component of OAuth 2.0.
  - `code` string — The authorization code generated by the user and given to you as a query parameter.
  - `grant_type` 'authorization_code' | 'production_token', required — The credential you request in exchange for the code. In Production, this is always `authorization_code`. In Sandbox, you can pass either enum value.
  - `production_token` string — The production token you want to exchange for a sandbox token. This is only available in Sandbox. Set `grant_type` to `production_token` to use this parameter.

## Response `200`

OAuth Token

- OauthToken — A token that is returned to your application when a user completes the OAuth flow and may be used to authenticate requests. Learn more about OAuth [here](/documentation/oauth).
  - `access_token` string, required — You may use this token in place of an API key to make OAuth requests on a user's behalf.
  - `group_id` string, required — The Group's identifier. A Group is the top-level organization in Increase.
  - `token_type` 'bearer', required — The type of OAuth token.
  - `type` 'oauth_token', required — A constant representing the object's type. For this resource it will always be `oauth_token`.

## Other responses

- `4XX` — Error
- `5XX` — Error

---

[API](https://skmtc.net/increase/apis/increase-api-2.md) · [All operations](https://skmtc.net/increase/apis/increase-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/increase/increase-api-2/versions/e968bcd4dcf9/schema)
