Skip to main content
POST
/
api
/
v1
/
users
/
{user_id}
/
token
Create User Token
curl --request POST \
  --url https://api.example.com/api/v1/users/{user_id}/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "app_id": "<string>",
  "app_secret": "<string>"
}
'
{
  "access_token": "<string>",
  "token_type": "bearer",
  "refresh_token": "<string>",
  "expires_in": 123
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

user_id
string<uuid>
required

Body

application/json

Request schema for exchanging app credentials for user token.

Both fields are optional - if not provided, admin authentication is required.

app_id
string | null
app_secret
string | null

Response

Successful Response

Token response with optional refresh token.

access_token
string
required
token_type
string
default:bearer
refresh_token
string | null
expires_in
integer | null