Skip to main content

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

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the auth token to retrieve

Example Requests

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())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the auth token(unique)
keyStringThe regenerated authentication token key(unique)
user_dataObjectInformation about the user associated with the token
created_atDateTimeTimestamp when the token was created
updated_atDateTimeTimestamp when the token was last updated (regenerated)

UserData fields

FieldTypeDescription
idIntegerUser id(unique)
usernameStringUsername of the related user(unique)
mobile_numberStringUser mobile number (unique)
first_nameStringFirst name of the user (nullable)
last_nameStringLast 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"
}