Create token
This endpoint allows you to create a new API Access Token.
Endpoint
POST /user/v1/users/{user}/access/{access}/tokens
Parameters
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| user | URL | Yes | String | The user identifier | |
| access | URL | Yes | Integer | The access identifier | |
| expires_at | Body | No | Datetime | The token expiration datetime |
Response
A TokenResponse, about the newly created Token object.
Example request
POST /user/v1/users/c0b48140-34cb-4187-acd7-aaa830dc97f9/access/127/tokens
Body
{
"expires_at": "2024-01-01 00:00:00"
}
Example response
{
"message": "OK",
"data": {
"id": 1,
"token": "ec21a22e-d2e9-49d0-bbff-50eeef5e36b5",
"expires_at": "2024-01-01T00:00:00+00:00",
"created_at": "2023-09-16T01:20:27+00:00",
"updated_at": "2023-10-16T15:40:35+00:00"
}
}