Retrieve Auth Token
Retrieve an auth token details
HTTP Request
GET/api/users/auth_tokens/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff with UserAuthTokenPermission or Admin
- Permission Code: 1242
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | Unique ID of the auth token to retrieve |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3response = requests.get('http://www.example.com/api/users/auth_tokens/123',
4 headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.json())1curl "http://www.example.com/api/users/auth_tokens/123" -H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the auth token(unique) |
| key | String | The regenerated authentication token key(unique) |
| user_data | Object | Information about the user associated with the token |
| created_at | DateTime | Timestamp when the token was created |
| updated_at | DateTime | Timestamp when the token was last updated (regenerated) |
UserData fields
| Field | Type | Description |
|---|---|---|
| id | Integer | User id(unique) |
| username | String | Username of the related user(unique) |
| mobile_number | String | User mobile number (unique) |
| first_name | String | First name of the user (nullable) |
| last_name | String | Last name of the user (nullable) |
Example Response
{
"id": 2,
"key": "10f6e409ef5c30aa2622f054e6b8c27aff88c217",
"user_data": {
"id": 2,
"username": "staffer",
"mobile_number": "09213546854",
"first_name": "عماد",
"last_name": "رخشانی"
},
"created_at": "2025-11-22T13:26:10.040039Z",
"updated_at": "2025-11-22T13:26:10.040044Z"
}