Skip to main content
POST
Get User Profile

Overview

This endpoint returns the profile information for the currently authenticated user. Authentication is required via JWT token.

Authentication

This endpoint requires authentication. Include a valid JWT access token in the Authorization header:

Request

Endpoint

Headers

Request Body

No request body required. The user is identified from the authentication token.

Response

Success Response (200 OK)

Returns the user profile data serialized using UsersSerializer:

Response Fields

Error Responses

401 Unauthorized

Returned when the authentication token is missing or invalid:

404 Not Found

Returned when the authenticated user cannot be found in the database:

500 Internal Server Error

Returned when an unexpected error occurs:

Example Request

Example Response

Implementation Details

This endpoint is implemented in /apps/users/views.py:84 as the profile function view:
  • Decorated with @permission_classes([IsAuthenticated]) to require authentication
  • Uses UsersSerializer to serialize the user data from request.user
  • Returns all fields from the Users model (which extends Django’s AbstractUser)