Notify User if Online
A 2-step recipe with Azure Web PubSub. We can help you get access.
Recipe · 2 steps
Notify User if Online
with Azure Web PubSub
Check whether a user is connected, then send a message only if online.
- Probe whether the user currently has any connections. A 200 means online; a 404 means no connection.
- Deliver the supplied plain-text message to every connection owned by the user.
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.
- userId: The user id to check and notify.
- message: The plain-text message to deliver to the user.
For your developer
Arazzo workflow microsoft-azure-web-pubsub:notify-user-if-online, 2 operations: webPubSub_userExists → webPubSub_sendToUser. Specs on APIs.io.