Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/floriansalvi/HEIG-VD_Ocha-api/llms.txt

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

The get profile endpoint returns the complete profile record for the user identified by the Bearer token in the request. The user object is attached to the request by the authentication middleware after the token is verified, and is returned directly without an additional database query. This endpoint exposes all stored profile fields, including the user’s role and account creation timestamp.
This endpoint requires a valid JWT token. Include it as Authorization: Bearer <token> in the request headers. Requests without a valid token are rejected with 401 Unauthorized.
Method: GET   Path: /api/v1/users

Request

No request body or query parameters are required. Authentication is provided via the Authorization header.

Response — 200 OK

user
object
The full profile object for the authenticated user.

Error codes

StatusMeaningCause
401 UnauthorizedMissing or invalid tokenNo Authorization header was sent, or the token is expired or malformed

Example

curl --request GET \
  --url https://api.example.com/api/v1/users \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
{
  "user": {
    "id": "6642f1a2c3d4e5f6a7b8c9d0",
    "email": "[email protected]",
    "display_name": "test_user",
    "phone": "12345678",
    "role": "user",
    "created_at": "2024-05-14T10:22:10.000Z"
  }
}

Build docs developers (and LLMs) love