List a user's access tokens
GEThttps://api.motherduck.com/v1/users/:username/tokens
List a user's access tokens
Request
Path Parameters
username stringrequired
Possible values: <= 255 characters
user within the organization
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Successful response
- application/json
- Schema
- Example (auto)
Schema
tokens object[]required
{
"tokens": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expire_at": "string",
"created_ts": "string",
"read_only": true,
"token_type": "read_write"
}
]
}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
The error message
Example:
Bad Request
codestringrequired
The error code
Example:
BAD_REQUEST
issues object[]
{
"code": "BAD_REQUEST",
"message": "Bad Request",
"issues": []
}
Invalid Credentials
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
The error message
Example:
Invalid Credentials
codestringrequired
The error code
Example:
UNAUTHORIZED
issues object[]
{
"code": "UNAUTHORIZED",
"message": "Invalid Credentials",
"issues": []
}
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
The error message
Example:
Unauthorized
codestringrequired
The error code
Example:
FORBIDDEN
issues object[]
{
"code": "FORBIDDEN",
"message": "Unauthorized",
"issues": []
}
Not Found
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
The error message
Example:
Not Found
codestringrequired
The error code
Example:
NOT_FOUND
issues object[]
{
"code": "NOT_FOUND",
"message": "Not Found",
"issues": []
}
Internal Error
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
The error message
Example:
Internal Error
codestringrequired
The error code
Example:
INTERNAL_SERVER_ERROR
issues object[]
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Error",
"issues": []
}
Authorization: http
name: Authorizationtype: httpscheme: bearer
- curl
- nodejs
- python
- go
- java
- CURL
curl -L 'https://api.motherduck.com/v1/users/:username/tokens' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>'
ResponseClear