Session authorization tokens (1.0)

This is the API reference for Aircore session authorization tokens (session auth tokens).

When you use a secret API key, your backend requests session auth tokens from this API.

Flow diagram for secret API keys.

See Secret API keys🔗 on the Authentication🔗 page for more info.

Get a session auth token

Use this endpoint to get session auth tokens.

Authorizations:
BearerAuth
Request Body schema: application/json
token_lifetime
required
number

Token lifetime in seconds. Maximum 24 hours (86400).

user_id
required
string

An ID for the user.

channel_id
required
string

An ID for the channel🔗, which represents a group of users.

required
object

Permissions object.

Responses

Request samples

Content type
application/json
{
  • "token_lifetime": 600,
  • "user_id": "b7c9afd0-7155-479b-9ccc-04d508f9e61e",
  • "channel_id": "f184a09c-f0ce-48e6-8af2-44ed57359856",
  • "services": {
    }
}

Response samples

Content type
application/json
{
  • "token": "string"
}