Authentication (obtaining an OAuth 2.0 access token)
Every administration REST API call must embed a valid access token returned by this API:
Verb | POST |
Resource | /oauth/token |
Content type | application/x-www-form-urlencoded |
Body | grant_type=client_credentials& client_id=<id>& client_secret=<secret>& terminalid=<terminalid> |
Where:
Field | Description |
grant_type | Grant type is “client_credentials”. |
client_id | User’s client Id (string) |
client_secret | User’s OAuth 2.0 secret (string) |
terminalid | User’s terminal ID |
The response data is a JSON object with the following structure:
{ | Field | Description |
“token_type”: ”Bearer”, | Always bearer | |
“expires_in”: <time (s)>, | Access token validity period (s) | |
“access_token”: “<access token>” | Access token to be used in subsequent administration requests. | |
} |