realtime_check_permission( )


Checks permissions for a subscriber on a channel or resource.

This hook runs automatically whenever a new subscription is attempted.

Set up this hook as a named export in the realtime-permissions.js file in a site's backend.

Learn more about setting up permissions.

Method Declaration
Copy
Method Parameters
channelChannelRequired

Channel and resource to check permissions for.


subscriberSubscriberRequired

Subscriber to check permissions for.

Returns
Return Type:Promise<ChannelPermissions>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?