Open your Web PubSub resource in portal, go to Keys tab, and get a temp Client Access Url:
[{{l.time}}] {{ l.log }}


Create your instance from the Azure portal, and go the Keys tab of the instance from the portal.

Keys tab contains a Client URL Generator for quick test purpose, and in this quick start demo we will use the temp Client URL generated from this generator. In real-world applications, SDKs are provided to generate the client URLs from Connection String provided in this Keys tab.

Client URL

  • Connection: connection stands for a WebSocket client connection.
  • Hub: hub is the logical isolation for connections. Connections always connect to a hub, connections can only send to those within the same hub.
  • User ID: A connection can belong to a user when it is auth-ed.
  • Token Lifetime: Specifies the lifetime of this client URL’s token. When the token expires, you get 401 Unauthorized when connecting to the service with this URL.
  • Roles: Specifies the roles for the connection. It can be used when the connection connects with subprotocol that empowers the client to join/leave/send to groups.

Sent Events: