Provision Client and Join Group
A 3-step recipe with Azure Web PubSub. We can help you get access.
Recipe · 3 steps
Provision Client and Join Group
with Azure Web PubSub
Generate a client token, add a connection to a group, then announce the join to the group.
- Mint a client access token for the user that browser clients use to connect to the hub.
- Add the connection to the named group so it begins receiving group messages.
- Broadcast the join announcement to every connection in the group.
What you'll need to have ready
- accessToken: JWT bearer token for the Web PubSub data plane.
- apiVersion: Data plane REST API version.
- hub: Target hub name.
- group: Group name to join and announce to.
- connectionId: The connection id to add to the group.
- userId: Optional user id to embed in the generated client token.
- minutesToExpire: Token lifetime in minutes.
- announcement: The plain-text announcement broadcast to the group on join.
For your developer
Arazzo workflow microsoft-azure-web-pubsub:provision-client-and-join-group, 3 operations: webPubSub_generateClientToken → webPubSub_addConnectionToGroup → webPubSub_sendToGroup. Specs on APIs.io.