List API tokens
Changed onLists the project API tokens the caller can manage, newest first. Use it to find the id of a token before you update, regenerate, or delete it, or to check when each token last authenticated a request.
Token values are never returned. A token's value appears only in the response that issued it: Create API token or Regenerate API token.
With a project API token, the list covers the tokens of the authenticated project and its subprojects. With a Personal access token, it covers the tokens of every project the token holder is enabled for, plus their subprojects. Pass project_id to narrow the list to one project.
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.
Request
- Base URLhttps://{Your_Space_Name}.signalwire.com
- URLhttps://{Your_Space_Name}.signalwire.com/api/project/tokens
- Auth
- HTTP basic
- or HTTP basic
Query parameters
Universal Unique Identifier.
Only return tokens that belong to this project. A project the caller cannot reach, or a value that is not a valid project ID, returns an empty list rather than an error.
The number of results per page.
Cursor token for paging, taken from the next or prev link of a previous response.
The page index. A value above 0 requires page_token.
Response
The request has succeeded.
Example response
{
"links": {
"self": "https://example-space.signalwire.com/api/project/tokens?page_number=0&page_size=50",
"first": "https://example-space.signalwire.com/api/project/tokens?page_size=50",
"next": "https://example-space.signalwire.com/api/project/tokens?page_number=1&page_size=50&page_token=PAea14556a-984f-11ee-b9d1-0242ac120002",
"prev": "https://example-space.signalwire.com/api/project/tokens?page_number=0&page_size=50&page_token=PBea14556a-984f-11ee-b9d1-0242ac120002"
},
"data": [
{
"name": "John Doe's Token",
"permissions": [
"calling",
"fax",
"messaging"
],
"last_used_at": "2024-05-06T12:20:00Z"
}
]
}Changes
- info
endpoint added
- info
Some revisions have not been checked yet.