WebSocket Authentication
Guide how to authenticate your API user to the Niza WebSocket.
Last updated
Guide how to authenticate your API user to the Niza WebSocket.
Last updated
To listen to private channels an authorization token is required. This is accomplished by making an HTTP request to the . The authorization token received should be set in the payload of the subscribe message.
If you are using Pusher client the authorization endpoint should be set when initializing Pusher instance, read more about setting the authorization endpoint .
Example of initialization of the Pusher with channelAuthorization
POST
/broadcasting/auth
Headers
Content-Type
application/json
X-API-Key
API Key
X-API-Sign
Body
socket_id
number
The id of the currently connected WebSocket.
channel_name
string
The private channel name you want to subscribe.
Response
Authorize channel subscription. Request should be made to the general .
The generated signature, check api .