v4

latestOpenAPI 3.1.02026-08-012402353.8 MB

Create an OAuth Token

post/oauth/tokens

Request body

client_idstring

The public identifier for your application.

client_secretstring

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.

codestring

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_tokenstring

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.

Example request

{
  "client_id": "12345",
  "client_secret": "supersecret",
  "code": "123",
  "grant_type": "authorization_code"
}

Response

OAuth Token

access_tokenstring required

You may use this token in place of an API key to make OAuth requests on a user's behalf.

group_idstring 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.

Example response

{
  "access_token": "12345",
  "group_id": "group_1g4mhziu6kvrs3vz35um",
  "token_type": "bearer",
  "type": "oauth_token"
}