capabilities.work

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

Check whether a user is connected, then send a message only if online.

  1. Probe whether the user currently has any connections. A 200 means online; a 404 means no connection.
  2. 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.