Skip to content

Get Current User ​

Retrieve detailed information about the currently authenticated user. This endpoint is commonly used to fetch the user's profile data after app launch, validate that a stored token is still active, and display user information in the app's UI.

The response includes essential user details like name, email, phone number, avatar, and verification status. This information helps the app determine what features are available to the user and what steps they may need to complete (like verifying their email or uploading documents).

This endpoint is also useful for implementing "remember me" functionality. When the app launches, call this endpoint with the stored token to verify it's still valid and refresh the user's profile data.

Endpoint ​

INFO

GET /api/v1/client/auth/me

Headers ​

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes
X-Agency-Signature{signature}Yes

Example Request ​

bash
curl -X GET https://api.daakey.com/api/v1/client/auth/me \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -H "X-Agency-Signature: {signature}"

Response ​

Success (200) ​

json
{
  "success": true,
  "message": "User retrieved",
  "data": {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890",
    "avatar_url": "https://api.daakey.com/storage/avatars/1.jpg",
    "phone_verified_at": "2024-01-01T00:00:00Z",
    "email_verified_at": "2024-01-01T00:00:00Z",
    "created_at": "2024-01-01T00:00:00Z"
  },
  "meta": {
    "agency_id": 123,
    "agency_code": "AGENCY123"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (401) ​

json
{
  "success": false,
  "message": "Unauthenticated",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes ​

  • Use this endpoint to validate the current token
  • Returns basic user information without sensitive data

Daakey Car Sharing Platform