1️⃣Create Access Token

In order to access the API’s, first create an access token that will be used in the header of subsequent calls.

Access tokens expire in 24 hours from the time it was created but you are able to use this method to obtain a new token.

Create Access Token

POST /token?expires_in=1

Access tokens are only valid for 24 hours from its creation. Use this method if the current token is expiring soon or it may have been compromised to obtain a new Access Token. Client ID and secret credentials are provided by Optty.

Headers

NameTypeDescription

content-type*

application/x-www-form-urlencoded

Request Body

NameTypeDescription

client_id*

string

Client_ID credentials provided by Optty

client_secret*

string

Client secret credentials provided by Optty

grant_type*

string

Always “client_credentials”

scope*

string

The supported scope for machine-to-machine interaction for Optty’s APIs is “api-user”, this is needed to make API calls for placing an order

Content-type application/json:

{
"access_token": "<access token in JWT format>",
"expires_in": 86400,
"token_type": "Bearer",
"scope": "api-user"
}

Last updated