Channels allows you to easily create direct or grouped realtime message channels between users, server-side applications, IoT devices and more. You can use them to publish realtime events & even store realtime state objects which you can handle using our client-side SDKs.
unprotected
type, which means that you don’t need to
worry about handing out tokens to users on your frontend. This is useful if
you want to display realtime data on a frontend application that doesn’t
require user sign-in, for example.leap_token_xxx
)
can be generated using the Hop API or SDK from your backend. Tokens can contain
metadata - for example, you could include the user ID this token is generated
for in. You are expected to securely hand this token to a client application,
which they can then use to authenticate with Channels through the Hop client
SDK.
Tokens can subscribe to many channels at once. They are permanent until deleted.
If you have a database of users, then you should create a token for each
individual user that needs to connect to Channels and store it in relation to
their user, then re-use that same token when they need to connect again in the
future.
You can connect and authenticate with Channels multiple times under the same
token.
subscribe
method with
a channel ID. If the channel is private, then a webhook call will be required
to succeed before the client is subscribed.ephemeral
, which will delete the
subscription when the session dies.
ephemeral
capability, which makes them
automatically delete once all subscribers have disconnected.