Authentication

The Rollee's API is protected with JWT authentication. The initial token is provided by Rollee with a specific validity time period.
You can create a new valid token when the previous one is closed to expire using the API.

Examples using curl:

  • Get list of users
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.getrollee.com/api/v0.4/users
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.sand.getrollee.com/api/v0.4/users
  • Refresh token
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.getrollee.com/api/v0.3/token/refresh
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.sand.getrollee.com/api/v0.3/token/refresh

json response:

{
    "token": "YOUR_NEW_TOKEN"
}

In case of wrong usage of the token, API's call will return a 401 Unauthorized response.