OAuth Tokens

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.

The OAuth Token object
{ "access_token": "12345", "token_type": "bearer", "type": "oauth_token" }
Attributes
access_token
string

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

token_type
string

The type of OAuth token.

type
string

A constant representing the object's type. For this resource it will always be oauth_token.

Create an OAuth Token
curl -X "POST" \ --url "${INCREASE_URL}/oauth/tokens" \ -H "Authorization: Bearer ${INCREASE_API_KEY}" \ -H "Content-Type: application/json" \ -d $'{ "client_id": "12345", "client_secret": "supersecret", "code": "123", "grant_type": "authorization_code" }'
Parameters
client_id
string

The public identifier for your application.

200 character maximum
client_secret
string

The secret that confirms you own the application. This is redundent given that the request is made with your API key but it's a required component of OAuth 2.0.

200 character maximum
code
string

The authorization code generated by the user and given to you as a query parameter.

200 character maximum
grant_type
enum
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.

200 character maximum