azure-web-pubsub-ts

Generate TypeScript snippets for Azure Web PubSub token negotiation and client connections.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-web-pubsub-ts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-web-pubsub-ts
Source: https://github.com/davidrrowley/CortexYouV3/tree/main/.agents/skills/azure-web-pubsub-ts
Command: npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-web-pubsub-ts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers implement reliable WebSocket-based real-time messaging and pub/sub patterns in TypeScript by providing clear patterns for server-side token negotiation, client connectivity, group management, and Express event handling.

Core Features & Use Cases

  • Server token negotiation: Generate client access tokens using WebPubSubServiceClient and secure credentials (connection string, Azure AD).
  • Client connectivity and events: Establish resilient WebPubSubClient connections, register event handlers, and manage reconnection and group messages.
  • Group and connection management: Add/remove users and connections to groups, broadcast messages, and manage permissions and connection lifecycle.
  • Use Case: Build a chat or live-notifications system where a backend issues negotiate tokens, clients connect via WebSocket, join rooms, and receive targeted messages.

Quick Start

Use the azure-web-pubsub-ts skill to generate server and client TypeScript snippets that set up a negotiate endpoint, create a WebPubSubServiceClient with secure credentials, and a WebPubSubClient that connects and joins a group.

Frequently Asked Questions about azure-web-pubsub-ts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement WebSocket real-time messaging in a TypeScript Express application?

To implement WebSocket real-time messaging in TypeScript Express, create a negotiate endpoint using WebPubSubServiceClient to generate tokens, then establish resilient client connections with WebPubSubClient to manage group events and messages.

How do I generate client access tokens for Azure Web PubSub in TypeScript?

Generate client access tokens for Azure Web PubSub by initializing WebPubSubServiceClient with secure credentials like a connection string or DefaultAzureCredential, then call the token negotiation method to issue access for client connectivity.

What is the best way to manage group membership and broadcast messages with Azure Web PubSub?

The best way to manage group membership with Azure Web PubSub is using WebPubSubServiceClient to add or remove users and connections to groups, then broadcast targeted messages to specific groups while managing connection lifecycle and permissions.

Can I use Azure Active Directory credentials instead of a connection string for Web PubSub authentication?

Yes, you can use Azure Active Directory credentials for Web PubSub authentication by configuring DefaultAzureCredential in your TypeScript server logic, which securely authorizes WebPubSubServiceClient operations without needing a hardcoded connection string.

How does reconnection handling work for WebPubSubClient in TypeScript real-time apps?

Reconnection handling for WebPubSubClient in TypeScript works by automatically re-establishing resilient WebSocket connections, registering event handlers, and managing group messages when network interruptions occur during real-time chat or notification features.

Does Azure Web PubSub support live notifications and collaborative features in TypeScript?

Azure Web PubSub supports live notifications and collaborative features in TypeScript by providing Express-based event handlers, WebSocket client connectivity, and group management to broadcast targeted real-time messages to connected users.