API ReferenceAuthentication APIGET /auth/me

GET /auth/me

Returns the currently authenticated user. Requires a valid JWT in the Authorization header (obtained from login, OTP verify, or register).

⚠️

Authentication required. You must send a valid JWT: Authorization: Bearer <token>

Endpoint

GET /api/v1/public/projects/:projectSlug/auth/me

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
projectSlugstringYour project’s unique slug

Headers

HeaderRequiredDescription
AuthorizationBearer <jwt-token> — token from login, register, or OTP verify

Response

Success (200 OK)

{
  "id": "user-uuid-here",
  "email": "user@example.com",
  "name": "Jane Doe",
  "email_verified_at": "2026-02-10T10:00:00Z",
  "profile_extras": {
    "company": "Example Inc",
    "phone": "+1-555-1234"
  }
}
FieldTypeDescription
idstringUser UUID
emailstringUser’s email
namestringDisplay name
email_verified_atstring | nullISO date when email was verified, or null
profile_extrasobjectCustom signup fields stored for this user

Error Responses

Status CodeError CodeDescription
401UNAUTHORIZEDMissing or invalid token
429RATE_LIMIT_EXCEEDEDToo many requests
500INTERNAL_SERVER_ERRORServer error

Hooks

This endpoint is read-only. You can optionally attach a project event such as auth.me.read to track profile reads. Configure in Project → Hooks.

Try It Now

Paste a JWT from a previous login or register call to test.

GEThttps://api.aerocall.app/api/v1/public/projects/your-project/auth/me

SDK Example

const token = localStorage.getItem('authToken');
const response = await fetch(
  'https://api.aerocall.app/api/v1/public/projects/your-project/auth/me',
  {
    headers: {
      'Authorization': `Bearer ${token}`
    }
  }
);
 
if (!response.ok) {
  if (response.status === 401) {
    // Token expired or invalid — redirect to login
    window.location.href = '/login';
  }
  throw new Error((await response.json()).message);
}
 
const user = await response.json();
console.log('Current user:', user);