Keys and permissions
Separate backend administration, room access and viewer playback authority.
On this page
Your backend holds management credentials and decides what a user may do. Browsers receive limited participant tokens or playback grants for the specific action your application authorizes.
API keys
Secret API keys authorize REST administration within one project environment. Grant only the scopes your backend needs, such as rooms:create and tokens:create for the first-call workflow. The Node SDK accepts secret keys with the rk_sk_ prefix.
A publishable key can read its API context; it cannot create rooms, issue participant tokens or administer participants. See the API scope reference for the complete catalog.
Store secret keys in backend configuration. Do not put them in public environment variables, browser bundles, query strings or join responses.
Participant permissions
Participant tokens authorize a room identity, not REST administration.
| Permission | Allows |
|---|---|
room:join | Join the specified room; required in every token. |
audio:publish | Publish microphone audio. |
video:publish | Publish camera video. |
screen:publish | Publish shared display video and supported display audio. |
messages:send | Send text messages and custom events. |
metadata:update | Update the participant's metadata. |
The token endpoint defaults to ['room:join']. Grant publication permissions explicitly. Hiding a button does not enforce a permission; the token does.
Your token endpoint
Before issuing a token:
- Authenticate the application user.
- Look up the room from your application's call record.
- Verify that the user may join that call.
- Derive their display name and permitted actions from trusted application data.
- Issue a token for that caller and return only the data needed to join.
Creating a replacement token does not revoke an existing one or update an active participant's permissions. Use authorized renewal to preserve identity, and server-side removal/end operations for administrative teardown.
Webhooks
Verify the signature against the original request bytes before parsing JSON. Check timestamp validity and atomically deduplicate the event ID with your processing result. A valid signature does not imply the event has not already been delivered.
The endpoint signing secret is separate from your API key. Keep both on the server. See webhook integration.
Camera access
Use HTTPS in production and offer clear capture controls. camera.disable() releases capture and removes its publication. camera.mute() keeps capture open and pauses sending after server confirmation. The same distinction applies to the microphone.
Browser permission to capture does not grant permission to publish into a room. Both browser permission and the participant token's publication permission must allow the action.
Streaming authority
Encoder credentials, participant tokens and viewer grants serve different purposes. Keep streams:write, streams:publish and streams:playback management operations on the backend. Authenticate each publisher or viewer and check access to the intended stream or run before returning a credential or grant.
Playback grants expire. Issuing a grant does not prove the media is ready, and a playback URL is not a public asset URL. See private playback for delivery authorization and readiness.
Logs and errors
Record safe error codes and request IDs for diagnosis. Avoid logging API keys, participant tokens, webhook secrets, encoder credentials, signed playback URLs or full credential responses. Return useful application errors without exposing backend secrets or raw provider responses.
Room policy
Room roles and permission ceilings are assigned and enforced by the server. Metadata cannot grant a role. Host/moderator assignment does not expand signed publication grants, and persisted restrictions continue to apply after token renewal. Manage policies with the participants:write secret-key scope or an authorized participant session.