API keys

The API keys tab lists all API keys associated with your account and provides information on each key's capabilities and restrictions. You can create a new API key and manage an existing one.

Create a new API key

The following steps create a new API Key:

  • Click Create a new API key.
    • Assign a friendly name.
    • Give the new API key a descriptive name (e.g. chat app key) so it is easy to identify later.

To manage an API key: set capabilities, define resource restrictions, use revocable tokens for security, and adjust key settings as needed.

Capabilities

Capabilities provide permissions required for managing message flow, user presence, notifications, channel information, and access controls, these depend on what you require the API key to have access to:

CapabilityDescription
PublishAllow clients to publish messages to channels.
SubscribeAllow clients to receive messages and presence state changes.
HistoryAllow clients to retrieve message and presence history.
PresenceAllow clients to register presence on a channel.
Channel metadataAllow clients to query channel metadata.
Push admin and push-subscribeAllow clients to manage and subscribe to push notifications.
StatisticsAllow clients to query usage statistics.
Privileged headersAllow clients to set privileged headers, such as to skip channel rules.

Set resource restrictions

Set resource restrictions to control access to channels and queues, ranging from unrestricted access to specific, rule-based permissions:

RestrictionDescription
NoneNo restrictions; access any channel or queue.
Only channelsAccess any channel but not queues.
Only queuesAccess any queue but not channels.
Selected channels and queuesSpecify explicit rules for access.

Revocable tokens

Revocable tokens enhance security by allowing shorter token lifetimes and the ability to revoke tokens issued via the API key.

OptionDescription
Revocable tokensImplement security measures by setting shorter token lifetimes and enabling the ability to revoke tokens issued by the API key.

Change your API key settings

Click Settings on the required API key to change its settings. The same settings apply as when creating a new API key.