Skip to main content

GET /api/users/me

Retrieve the complete profile of the currently authenticated user, including preferences and settings.

Authentication

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

Response

Returns the user profile object with all properties except the password.
id
string
User UUID
email
string
User’s email address
firstName
string
User’s first name
lastName
string
User’s last name
avatarUrl
string | null
URL to user’s avatar image
phone
string | null
User’s phone number
authProvider
string
Authentication provider: LOCAL, GOOGLE, MICROSOFT, or APPLE
currency
string
User’s preferred currency (default: ARS)
fiscalStartDay
number
Day of month when fiscal period starts (1-28)
timezone
string
User’s timezone (default: America/Argentina/Buenos_Aires)
language
string
User’s preferred language (default: es)
role
string
User role: USER or ADMIN
isActive
boolean
Whether the user account is active
subscription
string
Subscription tier: FREE or PRO
emailVerified
string | null
Timestamp of email verification, or null if not verified
createdAt
string
Account creation timestamp
updatedAt
string
Last update timestamp

Example Request

cURL
curl -X GET http://localhost:3000/api/users/me \
  -H "Authorization: Bearer <token>"
JavaScript
const response = await fetch('http://localhost:3000/api/users/me', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${token}`
  }
});

const user = await response.json();
Python
import requests

headers = {'Authorization': f'Bearer {token}'}
response = requests.get(
    'http://localhost:3000/api/users/me',
    headers=headers
)

user = response.json()

Example Response

{
  "id": "user-uuid-123",
  "email": "[email protected]",
  "firstName": "John",
  "lastName": "Doe",
  "avatarUrl": null,
  "phone": null,
  "authProvider": "LOCAL",
  "currency": "ARS",
  "fiscalStartDay": 1,
  "timezone": "America/Argentina/Buenos_Aires",
  "language": "es",
  "role": "USER",
  "isActive": true,
  "subscription": "FREE",
  "emailVerified": "2024-01-15T10:00:00.000Z",
  "createdAt": "2024-01-15T10:00:00.000Z",
  "updatedAt": "2024-01-20T14:30:00.000Z"
}

Error Responses

{
  "statusCode": 401,
  "message": "Unauthorized"
}
Token is missing, invalid, or expired.
{
  "statusCode": 404,
  "message": "User not found"
}

Difference from /auth/profile

This endpoint (/users/me) returns more detailed information than /auth/profile, including:
  • Subscription tier
  • Email verification status
  • Fiscal preferences
  • Phone number
  • Creation and update timestamps
Use /auth/profile for quick token validation and basic user info. Use /users/me for complete profile data.

Use Cases

Profile Page

Display complete user information in a profile page

Settings Form

Pre-populate user settings in an edit form

Account Dashboard

Show user details and preferences in dashboard

Subscription Status

Check user’s current subscription tier

Update Profile

Modify user profile information

Auth Profile

Lightweight profile from JWT token

Build docs developers (and LLMs) love