Request Type:
POST
API Endpoint:
<url>/api/rest/auth
Mandatory Body Parameters:
user_name (type: string): The user name for accessing Grasshopper API
password (type: string): The password for accessing Grasshopper API
Response:
The response will return access and refresh tokens, along with a timestamp.
The timestamp is the expiration of the access token.
CODE SNIPPET
Grasshopper Labs
Response example:
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjVmMmU4Nzk0MzhmNjJhMDAyMWM1OTYzOSIsImlhdCI6MTYxNTk4NzIwNCwiZXhwIjoxNjE2MDczNjA0fQ.l5hTnsvfgrX5RLhskoizHNzsSxemt8RN6MyIk7VVWa8",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjVmMmU4Nzk0MzhmNjJhMDAyMWM1OTYzOSIsImlhdCI6MTYxNTk4NzIwNCwiZXhwIjoxNjE2NTkyMDA0fQ.YqM-QwMnVPHUJh9nqVbp-4Ca0Ixwb1VcJK8grKPN1gk", "expiration": "2021-03-18T13:20:04.724Z"
}