Refresh token - Grasshopper Labs API
Tokens

Refresh token

Use the refresh token to get a new access token without re-prompting for credentials.

POST /api/token/refresh/

Body parameters

refresh_token
string Required
The refresh token from a previous /api/token/ response.

Example

curl -X POST https://{licensee-url}/api/token/refresh/ \
  -H "Content-Type: application/json" \
  -d '{ "refresh_token": "rfsh_abc123..." }'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "rfsh_xyz789...",
  "expires_in": 3600
}
Try it out
Response will appear here
Refresh tokens rotate

Each refresh returns a new refresh_token. Discard the old one and store the new one.

Errors

Statuserror.codeCause
401invalid_refresh_tokenRefresh token not recognized or already used.
401refresh_token_expiredRefresh token has expired. Re-authenticate via /api/token/.