Generate a new API Token
Changed onCreates a project API token for server-side REST authentication within the project. It remains usable until you delete it or remove required permissions. Client applications should receive a service-specific Chat, PubSub, Room, or Subscriber Token instead.
For the SignalWire REST API's project route, use Create API token.
<Warning title="Save the token secret now">The response is the only place the token secret is returned. No later request, including Update an API Token, can read it back. If you lose it, Regenerate API token issues a new value for the same token and keeps its ID.</Warning>
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Management.
Learn more about API scopes.
Request
- Base URLhttps://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
- URLhttps://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/tokens
- AuthHTTP basic
Path parameters
Universal Unique Identifier.
The unique identifier for the project you want to use to authenticate this request.
Request body application/x-www-form-urlencoded
Example request
{
"name": "John Doe's Token",
"permissions": [
"calling",
"fax",
"messaging"
]
}Response
The request has succeeded.
Example response
{
"name": "John Doe's Token",
"permissions": [
"calling",
"fax",
"messaging"
],
"token": "swapi_0123456789ab0123456789ab0123456789ab"
}Changes
- breaking
added to the
request propertyallOflist - breaking
the
response's property type changed fromstringto no type, and format fromuuidto no format for status - info
the
request property type was generalized fromstringto no type, and format fromuuidto no format - info
added to the
response propertyallOflist for the response status
- breaking
- breaking
added 'unevaluatedProperties' constraint to the request body
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- breaking