Skip to main content
GET
/
api
/
v1
/
admin
/
me
curl -X GET "https://olive-gateway-a6ba.onrender.com/api/v1/admin/me" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "id": "123",
  "email": "admin@olive.sl",
  "first_name": "Admin",
  "last_name": "User",
  "role": "system_admin",
  "status": "active",
  "phone_number": "+23277123456",
  "last_login_at": "2025-01-15T09:30:00Z",
  "created_at": "2024-12-01T10:00:00Z",
  "agent_id": null,
  "pep_access_authorized": true
}
Returns details of the currently authenticated user.

Request

Authorization
string
required
Bearer <token> - JWT access token

Response

id
string
User ID
email
string
Email address
first_name
string
First name
last_name
string
Last name
role
string
User role
status
string
Account status (active, inactive, suspended)
phone_number
string
Phone number
last_login_at
string
Last login timestamp (ISO 8601)
created_at
string
Account creation timestamp
pep_access_authorized
boolean
Whether user has PEP account access

Examples

curl -X GET "https://olive-gateway-a6ba.onrender.com/api/v1/admin/me" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "id": "123",
  "email": "admin@olive.sl",
  "first_name": "Admin",
  "last_name": "User",
  "role": "system_admin",
  "status": "active",
  "phone_number": "+23277123456",
  "last_login_at": "2025-01-15T09:30:00Z",
  "created_at": "2024-12-01T10:00:00Z",
  "agent_id": null,
  "pep_access_authorized": true
}

Use Cases

  • Validate session on page load
  • Display user info in dashboard header
  • Check user permissions

Errors

StatusCodeDescription
401UNAUTHORIZEDNot authenticated or token expired
404NOT_FOUNDUser not found