Skip to main content
A private channel carries your own data: private-user-{user_id}. You can only subscribe to your own channel. Your user ID is the id in GET /me/. Public channels (event and event-{event_id}) do not require authorization. Subscribing to a private channel needs a short-lived token. Request it from the Futuur API:
POST https://api.futuur.com/v1.5/realtime/auth/ works the same way. The endpoint uses the same authentication as the rest of the API: HMAC headers (Key, Timestamp, HMAC) for API users, or a session or JWT for the website. See Authentication for key setup and the required User-Agent header.
Pusher is deprecated. The Pusher authorization endpoints at the end of this page keep working until 2027-03-18. New integrations should use the gateway and this token endpoint.

Request a token with HMAC

Send the channel as a form field and sign it with your HMAC key, like any other request. The string to sign is every parameter — Key, Timestamp, and channel — sorted by name in case-sensitive code-point order, so the capitalized Key and Timestamp come first, then hashed with HMAC-SHA512 using your private key. For private-user-9 the signed string is exactly:
Do not sort with localeCompare. It is case-insensitive and puts channel before Key, which gives a signature the server rejects with 401 authentication_failed. Encode the values the way Python urlencode does. See Authentication for the exact rules.
Keep the private key on your server. Never ship it to a browser. A browser app asks your own backend for a token.
A JSON body {"channel":"private-user-9"} works for session and JWT clients. The response is:
Treat the token as opaque. These errors are plain {"detail": "..."} bodies:

Use the token

Send the token as auth in the subscribe operation:
The token is valid for 5 minutes and is only checked when you subscribe. An open subscription stays open after the token expires. Request a new token before each new connection. Subscribing again to a channel on the same connection needs no new token. If the token is missing, invalid, or expired, the gateway answers with an error frame with code forbidden. See Overview.

Example: private channel in Python

This script subscribes to your own private-user-{id} channel. It signs the token request with HMAC and asks for a fresh token on every connection. It resumes with since after a reconnect, and reconnects on a gap. It needs pip install websockets requests. Set PUBLIC_KEY, PRIVATE_KEY, and USER_ID first.
Python

Pusher authorization (deprecated)

Deprecated. Pusher delivery to API users ends on 2027-03-18. Until then these endpoints keep working unchanged. Use the token endpoint above for the gateway.
Pusher requires an authorization token before a client can subscribe to a private channel. When subscribing, the Pusher client sends socket_id and channel_name to your authorization endpoint. API bots call Futuur’s channel authorization endpoint:
POST https://api.futuur.com/v2.0/pusher/user-auth/ is also available and unchanged. Authenticate with HMAC headers (Key, Timestamp, HMAC). The string to sign is every parameter — Key, Timestamp, channel_name, and socket_id — sorted by name in case-sensitive code-point order, so the capitalized Key and Timestamp come first:
Do not sort with localeCompare. It is case-insensitive and puts channel_name before Key, which gives a signature the server rejects with 401 authentication_failed. Encode the values the way Python urlencode does. See Authentication for the exact rules.
A user may only subscribe to their own private-user-{user_id} channel; any other private or presence channel returns 403. Your user ID is the id in GET /me/. Public channels (event and event-{event_id}) do not require authorization. The endpoint returns {"auth": "..."} on success. Its errors are plain {"detail": "..."} bodies: 400 when channel_name or socket_id is missing, 401 when the HMAC check fails, 403 for a channel that is not yours.