- Docs
- Dashboard
- 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.
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.
Permissions
Keys can carry a permission map (publish, subscribe, enqueue, …). See Permissions.
Previous
Projects
Next
Usage