Skip to main content
GET
/
api
/
users
/
profile
Get User Profile
curl --request GET \
  --url https://api.example.com/api/users/profile
{
  "success": true,
  "data": {
    "id": "<string>",
    "email": "<string>",
    "displayName": "<string>",
    "photoURL": "<string>",
    "role": "<string>",
    "favorites": [
      {}
    ],
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}

Authentication

This endpoint requires authentication. Include a valid authentication token in your request.

Response

Returns the current user’s profile data including basic information and metadata.
success
boolean
required
Indicates if the request was successful
data
object
required
User profile data

Error Responses

404 Not Found
User not found in the database
{
  "success": false,
  "message": "User not found"
}
500 Internal Server Error
Server error while fetching profile
{
  "success": false,
  "message": "Failed to fetch profile"
}

Example Request

cURL
curl -X GET https://api.inmobiliaria.com/api/users/profile \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Content-Type: application/json"

Example Response

{
  "success": true,
  "data": {
    "id": "12345",
    "email": "[email protected]",
    "displayName": "John Doe",
    "photoURL": "https://example.com/photo.jpg",
    "role": "user",
    "favorites": [],
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
}

Build docs developers (and LLMs) love