v1

latestSwagger 2.02026-07-1324555.3 KB
webpubsub

Generate token for the client to connect Azure Web PubSub service.

post/api/hubs/{hub}/:generateToken

Path parameters

hubstring required

Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

Query parameters

userIdstring

User Id.

rolestring[]

Roles that the connection with the generated token will have.

minutesToExpireinteger

The expire time of the generated token.

api-versionstring required

The version of the REST APIs.

groupstring[]

Groups that the connection will join when it connects.

clientType'Default' | 'MQTT'

The type of client. Case-insensitive. If not set, it's "Default". For Web PubSub for Socket.IO, only the default value is supported. For Web PubSub, the valid values are 'Default' and 'MQTT'.

Response

Success

tokenstring

The token value for the WebSocket client to connect to the service