v1

latestOpenAPI 3.1.02026-07-146079.8 KB

Refresh Token

The Access token expires in 24 hours by default. Before your access token has expired, you can use this API to issue a new Access token using your refresh token. The refresh token must be the same that you received in the Get Access token API.This will generate a new set of Access token and Refresh token for you. Save them securely in your application against the user. Everytime you refresh a token, you will have to use the latest set of access and refresh tokens.

post/oauth/token

Request body

grant_type'authorization_code' | 'refresh_token' required
client_idstring required
client_secretstring required
redirect_uristring required

Omit if doing the Refresh; it's not applicable to Refresh Token case.

codestring required

Omit if doing the Refresh; it's not applicable to Refresh Token case.

refresh_tokenstring required

Omit if doing the Get Token; it's not applicable to Get Token case.

Response

200

access_tokenstring
token_typestring
expires_ininteger
refresh_tokenstring
scopestring
created_atinteger

Example response

{
  "access_token": "b5661ce94d9ead0c0478e10f0b9dbe553e7051b3a9bb9a316f2a8c39e07fe373",
  "token_type": "Bearer",
  "expires_in": 7200,
  "refresh_token": "fca3a39c62a44d6d2b69f53c271cfcb09d5ad135f58a37fad2c31039f44d2e04",
  "scope": "locations orders menus",
  "created_at": 1664556751
}
All 6 operations