Skip to main content
This endpoint decodes and validates the JWT supplied in the X-OTAS-USER-TOKEN header. On success it returns the full user profile associated with the token. This is useful for verifying that a stored token is still valid and for resolving the current user’s identity without re-authenticating.
The JWT is read exclusively from the X-OTAS-USER-TOKEN request header. No request body is required or expected.

Request

Method: POST
URL: http://localhost:8000/api/user/v1/authenticate/
Authentication: X-OTAS-USER-TOKEN header

Headers

X-OTAS-USER-TOKEN
string
required
Signed JWT returned by /api/user/v1/login/ or /api/user/v1/create/.

Response

status
integer
required
1 on success, 0 on failure.
status_description
string
required
user_authenticated on success.
response_body
object

Example

curl --request POST \
  --url http://localhost:8000/api/user/v1/authenticate/ \
  --header 'X-OTAS-USER-TOKEN: <your-token>'
{
  "status": 1,
  "status_description": "user_authenticated",
  "response_body": {
    "user": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "first_name": "Ada",
      "middle_name": "",
      "last_name": "Lovelace",
      "email": "[email protected]",
      "created_at": "2026-04-16T10:00:00.000000",
      "updated_at": "2026-04-16T10:00:00.000000"
    }
  }
}

Error responses

status_descriptionHTTP statusCause
missing_token400The X-OTAS-USER-TOKEN header was not present in the request.
invalid_token401The token is malformed, expired, or does not correspond to a known user.

Build docs developers (and LLMs) love