From 5bfd79477e4744983ef5cb6cb8d87c95491b177b Mon Sep 17 00:00:00 2001 From: Simon Woolf Date: Wed, 3 Jun 2026 11:44:36 +0100 Subject: [PATCH] docs(pusher): re-add server library, interoperability, and count details Restore information from the old Pusher adapter FAQ that was dropped in the transition to the current docs page: - Server-side (REST) Pusher library configuration, including host, app_id/key/secret split, and TLS option - Note that Pusher and Ably client libraries can be used side by side against the same channels - User and subscriber count behaviour (presence-channel only, and the distinction between the two) Previously documented at: https://support.ably.io/support/solutions/articles/3000055086-using-the-ably-pusher-protocol-adaptor/ Co-Authored-By: Claude Opus 4.8 (1M context) --- src/pages/docs/protocols/pusher.mdx | 43 +++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/pages/docs/protocols/pusher.mdx b/src/pages/docs/protocols/pusher.mdx index 74ec8ab344..0d753ce34f 100644 --- a/src/pages/docs/protocols/pusher.mdx +++ b/src/pages/docs/protocols/pusher.mdx @@ -63,13 +63,14 @@ const pusher = new Pusher('appId.keyId', { httpHost: 'main.pusher.ably.net', disableStats: true, forceTls: true, - cluster: 'eu' + cluster: 'eu', + authEndpoint: '...', }); ``` | Option | Description | @@ -79,9 +80,40 @@ You should only use your [Ably API key name](/docs/auth#format), not the full AP | disableStats | Disable the collection of stats in Pusher. | | forceTls | Force the connection to use TLS. This isn't required but strongly recommended by Ably to avoid sending private keys over a plain text connection. | | cluster | Set this to any value as it is required by Pusher. It has no impact on the Ably Pusher endpoint as Ably will use the closest data center available to the client. | +| authEndpoint | The address of your [auth server](#configure-rest), if you are using one. | You can also add any other Pusher options that you normally use. +### Configure a Pusher server library + +If doing anything other than subscribing to public channels, such as authorizing a client to access a private or presence channel or publishing from your backend, you will need to configure a Pusher server-side library to point at Ably. Using Ruby as an example: + + +```ruby +Pusher::Client.new( + app_id: 'appId', + key: 'appId.keyId', + secret: 'keySecret', + host: 'main.pusher.ably.net', + use_tls: true +) +``` + + +All other Pusher server libraries are configured in a similar way. + +| Option | Description | +|--------|-------------| +| app_id | Your Ably app ID. This is the part of the API key before the first dot. | +| key | Your Ably API [key name](/docs/auth#format). This is everything before the colon `:` in your API key. | +| secret | The secret portion of your API key. This is everything after the colon `:` in your API key. | +| host | Set the host to point to Ably: `main.pusher.ably.net`. | +| use_tls | Use TLS for the connection. This isn't required but is strongly recommended to avoid sending your API key secret over a plain text connection. | + + + ## Channel mapping Ably and Pusher have different naming restrictions for channel names, and use namespaces differently. @@ -105,3 +137,10 @@ The following are some example channel name mappings: | foo;bar | public:foo:bar | | private-ablyroot-foo | foo | | private-ablyroot-foo;bar | foo:bar | + +## User and subscriber count + +Both user count and subscriber count currently only work on presence channels. + +* User count returns the size of the presence set once it has been made unique by `clientId`. +* Subscriber count returns the raw size of the presence set.