v7

latestSwagger 2.02026-07-13251565.9 KB
webpubsub

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

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

api-versionstring required

The API version to use for this operation.

userIdstring

User Id.

rolestring[]

Roles that the connection with the generated token will have.

minutesToExpireinteger

The expire time of the generated token.

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

The request has succeeded.

tokenstring required

Access token for the client to connect Azure Web PubSub service