Users and Sessions

In order to use Rollee Connect, our product's interface, we must have Users and Sessions.

Users are instances of a Client's account, and a Client can have as many Users as desired, and each Connected Account is associated with a User.
One easy way to understand Users is to think of Users as the individuals that connect accounts.
Each User is represented by a unique ID (UUID). In order to help you identify which User you created, we allow Metadata to be added on the creation optionally.

Sessions are User identifiers with specific time ranges for when Rollee Connect is allowed to operate on behalf of a User. Each Session is uniquely associated with a User, although a User can have many Sessions.
One easy way to look at Sessions is by comparing them to Hotel Room Key Cards: you have an Hotel Room, but you can have more than 1 Key Card (for your child to keep, for instance), the Key Cards are only valid during your stay and whatever purchase made at the Hotel using your Room Key Card will be associated with you.
Each Session is represented by a unique ID (UUID) and has a 30-minute validity period (can be changed if requested).

Here are some requests that will be helpful to interact with Users and Sessions:

  • Create a User:
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.getrollee.com/api/v0.5/users

# with metadata
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.getrollee.com/api/v0.5/users --data '
{
     "metadata": {
          "newKey": "New Value",
          "newKey-1": "New Value"
     }
}
'
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.sand.getrollee.com/api/v0.5/users

# with Metadata
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.sand.getrollee.com/api/v0.5/users --data '
{
     "metadata": {
          "newKey": "New Value",
          "newKey-1": "New Value"
     }
}
'
  • Create a Session
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.getrollee.com/api/v0.5/users/<YOUR_USER_ID>/sessions/new
curl -X POST -H 'Authorization: Bearer <YOUR_TOKEN>' https://api.sand.getrollee.com/api/v0.5/users/<YOUR_USER_ID>/sessions/new
  • Get all Users:
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.getrollee.com/api/v0.5/users
curl -X GET -H "Authorization: Bearer <YOUR_TOKEN>" https://api.sand.getrollee.com/api/v0.5/users