List the caller's tokens. Admins see every token in the org.
GET
/v1/tokens
const url = 'http://127.0.0.1:8080/v1/tokens';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://127.0.0.1:8080/v1/tokens \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Tokens, newest first. Secrets are never returned.
Media typeapplication/json
object
tokens
required
Array<object>
object
id
required
string format: uuid
kind
required
string
display_prefix
required
The first characters of the token, safe to show.
string
label
required
string
user_id
string format: uuid
session_id
string format: uuid
project_id
string format: uuid
scopes
required
Array<string>
created_at
required
string format: date-time
expires_at
string format: date-time
last_used_at
string format: date-time
revoked_at
string format: date-time
Example
{ "tokens": [ { "kind": "user" } ]}No valid bearer token.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}The token may not do this.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}A rate limit or quota stopped the request. Retry-After gives seconds to wait.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Headers
Section titled “Headers”Retry-After
integer