Skip to main content
GET
/
auth
/
profile
curl -X GET http://localhost:3000/auth/profile \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "profile": {
    "profile": {
      "id": "1",
      "email": "arturo@gmail.com",
      "name": "Arturo Utrillaa",
      "role_id": 1
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/4rt21/backend-proyecto/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

This endpoint requires a valid JWT Bearer token.
Authorization
string
required
Bearer token for authenticationFormat: Bearer <your_access_token>

Response

The response contains a nested profile object extracted from the JWT token payload.
profile
object
Container object for the profile data
curl -X GET http://localhost:3000/auth/profile \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "profile": {
    "profile": {
      "id": "1",
      "email": "arturo@gmail.com",
      "name": "Arturo Utrillaa",
      "role_id": 1
    }
  }
}

Comparison with GET /users

EndpointSourceFields ReturnedUse Case
GET /auth/profileJWT token payloadid, email, name, role_idQuick profile info from token
GET /usersDatabase queryAll user fields including password, salt, image_path, timestampsFull profile with additional details
This endpoint extracts profile information directly from the JWT token payload without querying the database. For the most up-to-date user information (including image_path and timestamps), use GET /users instead.
Use this endpoint when you need basic user information quickly without a database query, such as for displaying the user’s name and email in the UI.

Build docs developers (and LLMs) love