- Docs
- Cloud
- API Keys
API Keys
API keys authenticate Socket and REST clients. Format:
<publicId>:<secret>
The secret is shown when the key is created — store it securely. The public id is used in token routes (/v1/key/:keyID/...).
Tasks
- Open a project → API Keys.
- Create a key; optionally set a permission map.
- Copy the full key once and store it in your secret manager.
- Update permissions or metadata as needed.
- Delete compromised or unused keys.
Permissions
When creating or editing a key, Cloud shows checkboxes for each action:
- publish — publish messages to channels
- subscribe — subscribe to channels (does not grant
_stats/_logs) - enqueue — enqueue jobs on queues
- dequeue — pull, ack, and nack jobs
- stats — subscribe to the
_statsplatform channel - logs — subscribe to the
_logsplatform channel
Resource restriction
By default, a key has access to all resources (*). To restrict it, choose Selected resources and enter channel or queue names.
Queue resources use the queue: prefix — for example queue:emails restricts enqueue/dequeue to the emails queue. Channel names are matched directly (for example notifications).
See Permissions for the full reference.
Using the key
const rest = new QPub.Rest({ apiKey: process.env.QPUB_API_KEY });
const socket = new QPub.Socket({ apiKey: process.env.QPUB_API_KEY });
For browsers, do not embed the secret. Issue a JWT or token request from your backend instead.
Previous
Projects
Next
Usage