Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/eggarcia98/auth-backend/llms.txt

Use this file to discover all available pages before exploring further.

Return the profile of the user associated with the provided access token. Use this to verify authentication state or fetch up-to-date user details.

Request

GET /api/v1/auth/me Requires a valid access token.

Headers

Authorization
string
required
Bearer access token obtained after login or OTP verification. Format: Bearer <accessToken>.

Response

success
boolean
required
Indicates whether the request succeeded. Always true on success.
data
object

Examples

curl --request GET \
  --url https://your-api.com/api/v1/auth/me \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'

Success response

200
{
  "success": true,
  "data": {
    "user": {
      "id": "usr_01h9...",
      "email": "user@example.com",
      "emailVerified": true,
      "provider": "email",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    }
  }
}

Error responses

401
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired token"
  }
}

Build docs developers (and LLMs) love