Skip to main content

Endpoint

GET /users/@me
Retrieve information about the currently authenticated user using a valid JWT token.

Headers

Authorization
string
required
JWT token obtained from login or registration. Pass the token directly as the header value.

Response

id
string
Unique identifier for the user.
username
string
Username of the user.
status
integer
Current status of the user.

Error codes

401 Unauthorized
Authorization token was not provided or is invalid.Exception: UnauthorizedExceptionThis error occurs when:
  • The Authorization header is missing
  • The JWT token is invalid or expired
  • The JWT token does not correspond to an existing user

Example request

curl -X GET https://api.example.com/users/@me \
  -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Example response

Success (200)

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "username": "johndoe",
  "status": 1
}

Error (401 Unauthorized)

{
  "message": "Unauthorized"
}

Build docs developers (and LLMs) love