createToken
PubSub API namespace — token creation.
Request
ttl
The maximum time, in minutes, for which the access token will be valid. Between 1 and 43,200 (30 days).
channels
Each channel with `write` and `read` objects with boolean as values. Max of 500 channels inside main `channels`.
Either `read`, `write`, or both are required inside each channel and default to false.
Each channel name can be up to 250 characters. Must be valid JSON.
member_id
The unique identifier of the member. Up to 250 characters. If not specified, a random UUID will be generated.
state
An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters.
Response
token
A PubSub Token to be used to authenticate clients to the PubSub Service.
Response Example
Response