Retrieve the profile of the currently authenticated user based on the JWT token.
curl --request GET \
--url https://your-api-host/api/Usuario/mi-perfil \
--header 'Authorization: Bearer <token>'
{
"exito": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"userName": "admin",
"nombrePerfil": "Administrador Master",
"imagen": "https://res.cloudinary.com/demo/image/upload/v1/usuarios/admin.jpg",
"activo": true
}
}
Authorization: Bearer <token>
true when the request succeeds and a valid session is found.Hide data properties
null if no image has been set.curl --request GET \
--url https://your-api-host/api/Usuario/mi-perfil \
--header 'Authorization: Bearer <token>'
{
"exito": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"userName": "admin",
"nombrePerfil": "Administrador Master",
"imagen": "https://res.cloudinary.com/demo/image/upload/v1/usuarios/admin.jpg",
"activo": true
}
}
| Status | Cause |
|---|---|
401 Unauthorized | The token is missing, expired, or does not correspond to a valid user. |
401 responses, this endpoint returns a structured JSON body: { "exito": false, "mensaje": "No hay una sesión activa." }. This is useful for detecting session expiry on the client side.curl --request GET \
--url https://your-api-host/api/Usuario/mi-perfil \
--header 'Authorization: Bearer <token>'
{
"exito": true,
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"userName": "admin",
"nombrePerfil": "Administrador Master",
"imagen": "https://res.cloudinary.com/demo/image/upload/v1/usuarios/admin.jpg",
"activo": true
}
}