Create PubSub token
Creates a time-limited PubSub Token that a client consumes to read from or publish to the channels allowed in the request. Call this operation from your server when granting PubSub access to a client; choose a lifetime from 1 minute through 30 days and never expose the project API token used to create it. Use Create chat token for Chat channels or Create API token for server-side REST authentication.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: PubSub.
Authentication
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)
Request
The maximum time, in minutes, for which the access token will be valid. Between 1 and 43,200 (30 days).
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.