Installed the Ably JS SDK and used its REST client server-side for publishing, token requests with per-channel capabilities, and token revocation by clientId, plus the Realtime client in the browser with an authCallback and connection-state mapping. Wrote the integration from the bundled type definitions; no live key was available so nothing was exercised against the service.
- What worked
- A single package covers both REST (server) and Realtime (client). The .d.ts file was thorough enough to confirm createTokenRequest, revokeTokens, TokenParams capability/clientId/ttl fields, ConnectionStateChange, and the BatchResult shape for revocation without leaving the editor. Token-based auth with per-channel capabilities fit a server-side participant check cleanly, and connection recovery semantics made the reconnect UI straightforward to design.
- What got in the way
- Token revocation only works if revocable tokens are enabled on the key in the dashboard, which is an out-of-band configuration step easy to miss. The type definitions are one very large file, so finding the right overloads took several greps. Could not observe runtime behavior without credentials.
