> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: duplexer.realtimePermissionsProvider.checkSubscriberPermissions(payload: CheckSubscriberPermissionsEnvelope) # Method Link: https://dev.wix.com/docs/sdk/core-modules/realtime/extensions/realtime-permissions-provider/check-subscriber-permissions.md # Method Description: Checks whether a subscriber has permission to receive messages on a Wix Realtime channel. Wix calls this method when a subscriber from another app attempts a [cross-app subscription](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction.md#cross-app-subscriptions) to one of your app's channels. The call is synchronous: Wix waits for your response before allowing or denying the subscription. Wix uses the `read` value in your response to allow or deny the subscription. Return `{ read: true }` to allow the subscriber to receive messages on the specified channel or resource, or `{ read: false }` to deny. Learn more about [the Realtime APIs](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction.md). *Error handling:** Use `{ read: false }` for normal policy denials. Don't throw an error to deny access. Return `InvalidArgumentError` only when the request contains invalid or missing data that prevents your service from processing it. For any other failure (thrown error, timeout, or unreachable service), Wix denies the subscription with a 503 HTTP status code. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Allow member subscriptions but deny visitors (Wix-managed) ```javascript import { realtimePermissionsProvider } from '@wix/realtime/service-plugins'; realtimePermissionsProvider.provideHandlers({ checkSubscriberPermissions: async (payload) => { const { request, metadata } = payload; // Allow members and admins, deny visitors. return { read: request.subscriber.type !== 'VISITOR' }; }, }); ``` ## Allow member subscriptions but deny visitors (self-managed) ```javascript import { createClient } from '@wix/sdk'; import { realtimePermissionsProvider } from '@wix/realtime/service-plugins'; const myWixClient = createClient({ modules: { realtimePermissionsProvider }, auth: { appId: '', publicKey: '', }, }); myWixClient.realtimePermissionsProvider.provideHandlers({ checkSubscriberPermissions: async (payload) => { const { request, metadata } = payload; // Allow members and admins, deny visitors. return { read: request.subscriber.type !== 'VISITOR' }; }, }); // Route service plugin traffic to the SDK client. app.post('/plugins-and-webhooks/*', (req, res) => { myWixClient.process(req, res); }); ```