Azure Web PubSub ClientToken API

Generate JWT tokens for client connections

Operations 1

POST /api/hubs/{hub}/:generateToken Generate a client access token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-web-pubsub-clienttoken-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-web-pubsub-clienttoken-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure Web PubSub Service Data Plane REST Client Token API
  description: 'Data plane REST API for Azure Web PubSub. Lets app servers send messages

    to connected WebSocket clients (broadcast, group, user, connection),

    manage connection/group/user membership, generate client tokens, and

    check/grant/revoke permissions. Authentication uses a JWT bearer token

    signed with the service AccessKey (HS256) or a Microsoft Entra ID token

    with scope https://webpubsub.azure.com/.default.

    '
  version: '2024-01-01'
  contact:
    name: Kin Lane
    email: kin@apievangelist.com
  license:
    name: Microsoft Terms of Use
    url: https://www.microsoft.com/en-us/legal/terms-of-use
servers:
- url: https://{instance}.webpubsub.azure.com
  description: Azure Web PubSub service instance
  variables:
    instance:
      default: example
      description: Web PubSub service instance name
security:
- bearer_auth: []
tags:
- name: ClientToken
  description: Generate JWT tokens for client connections
paths:
  /api/hubs/{hub}/:generateToken:
    post:
      tags:
      - ClientToken
      summary: Generate a client access token
      operationId: webPubSub_generateClientToken
      parameters:
      - $ref: '#/components/parameters/hub'
      - $ref: '#/components/parameters/apiVersion'
      - name: userId
        in: query
        schema:
          type: string
      - name: role
        in: query
        schema:
          type: array
          items:
            type: string
      - name: minutesToExpire
        in: query
        schema:
          type: integer
          default: 60
      - name: group
        in: query
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Token generated
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
components:
  parameters:
    apiVersion:
      name: api-version
      in: query
      required: true
      schema:
        type: string
        default: '2024-01-01'
    hub:
      name: hub
      in: path
      required: true
      schema:
        type: string
        pattern: ^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'JWT signed with the service AccessKey using HS256, or a Microsoft

        Entra ID OAuth 2.0 bearer token with scope

        https://webpubsub.azure.com/.default

        '