Project Tokens

Create API token

Creates a project API token for server-side authentication to SignalWire REST APIs, with only the permission categories supplied in the request. Use it when a backend service needs durable project credentials; client applications should receive a service-specific token such as a Chat Token, PubSub Token, Room Token, or Subscriber Token instead. The token remains usable until you delete it or remove required permissions.

The Compatibility API exposes the same project tokens through its account-scoped route. Use Generate a new API Token for that request format.

The response is the only place the token secret is returned. Store it securely; no later request, including Update API token, can read it back.

With a project API token, the new token belongs to the authenticated project, or to one of its subprojects when subproject_id is given; project_id is ignored. With a Personal access token, project_id is required and names the project the token is created for, which is how a root project created with Create a project gets its first credential.

Permissions

With a project API token, the token must have the following scope(s) enabled to make a successful request: Management.

With a Personal access token there are no scopes. The token holder must be an owner or admin of the space, and the request reaches only the projects the holder is enabled for, plus their subprojects.

Learn more about API scopes.

Token Permissions

You must set the functions allowed by this API Token by selecting which types of requests this API Token is allowed to make.

Valid options are: calling, chat, datasphere, fax, management, messaging, numbers, pubsub, storage, tasking, and video

post/api/project/tokens

Request body

namestring required

The name representing the API token.

permissionsProjectTokenPermission[] required

The permissions you would like to enable for this token. Valid permissions are calling, chat, datasphere, fax, management, messaging, numbers, pubsub, storage, tasking, and video

project_idstring uuid

Universal Unique Identifier.

subproject_idstring uuid

Universal Unique Identifier.

Example request

{
  "name": "John Doe's Token",
  "permissions": [
    "calling",
    "fax",
    "messaging"
  ]
}

Response

The request has succeeded.

idstring uuid required

Universal Unique Identifier.

namestring required

The name of the API Token.

permissionsProjectTokenPermission[] required

The permissions enabled for this token.

tokenstring required

The API token that can be used along with the project ID for basic authentication. It is returned only in this response and cannot be retrieved again; store it securely.

Example response

{
  "name": "John Doe's Token",
  "permissions": [
    "calling",
    "fax",
    "messaging"
  ],
  "token": "swapi_0123456789ab0123456789ab0123456789ab"
}

Changes

Changed in 1 of the 161 revisions of this API.3

    • ○

      the endpoint scheme security SignalWireBasicAuth was added to the API

      api-security-added

    • ○

      the endpoint scheme security SignalWirePersonalAccessTokenAuth was added to the API

      api-security-added

    • ○

      added the new optional request property

      new-optional-request-property

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 161 revisions, 3 have a changelog that could not be searched.