Add personal access token
Add a new personal access token for the user.
Path parameters
-
The unique identifier of the user.
POST /api/users/{userId}/personal-access-tokens
curl \
-X POST https://[tenant_id].logto.app/api/users/{userId}/personal-access-tokens \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string","expiresAt":42.0}'
Request examples
{
"name": "string",
"expiresAt": 42.0
}
Response examples (201)
{
"tenantId": "string",
"userId": "string",
"name": "string",
"value": "string",
"createdAt": 42.0,
"expiresAt": 42.0
}