Skip to content
Skip to Content
Coder Docs

Get user tokens

GET
/api/v2/users/{user}/keys/tokens

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

user*string

User ID, name, or me

Query Parameters

include_expired?boolean

Include expired tokens in the list

Response Body

OK

application/json
  1. response
[index: integer]?

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/users/{user}/keys/tokens" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
[  {    "allow_list": [      {        "id": "string",        "type": "*"      }    ],    "created_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "id": "string",    "last_used": "2019-08-24T14:15:22Z",    "lifetime_seconds": 0,    "login_type": "password",    "scope": "all",    "scopes": [      "all"    ],    "token_name": "string",    "updated_at": "2019-08-24T14:15:22Z",    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"  }]