Skip to main content

Endpoint

GET /api/auth/me
Get the profile information of the currently authenticated user.

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer <your_token>

Response

id
integer
required
Unique identifier of the user
email
string
required
Email address of the user
name
string
required
Full name of the user
created_at
string
required
Timestamp when the user account was created (ISO 8601 format)

Example Request

curl -X GET "http://localhost:8000/api/auth/me" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Example Response

200 OK
{
  "id": 1,
  "email": "[email protected]",
  "name": "John Doe",
  "created_at": "2024-01-15T10:30:00Z"
}

Error Responses

The token is missing, invalid, or expired.
{
  "detail": "Could not validate credentials"
}
This endpoint is useful for verifying token validity and retrieving basic user information after authentication.

Build docs developers (and LLMs) love