CourseLayer Logo

User Management

User profile and account management endpoints

User Management

Manage user profiles and account information.

Get Current User

Get the currently authenticated user's information. This endpoint confirms that the current user exists and is authenticated.

Endpoint

GET /api/v1/user

Headers

Authorization: Bearer YOUR_ACCESS_TOKEN

Response

{
  "id": 123,
  "email": "[email protected]",
  "name": "John Doe",
  "country": "United States",
  "created_at": "2024-01-01T00:00:00Z",
  "email_verified_at": "2024-01-01T00:30:00Z"
}
{
  "status": "ERROR",
  "message": "Access forbidden"
}
{
  "status": "ERROR",
  "message": "User not found"
}

Authentication Required

All user management endpoints require a valid Bearer token in the Authorization header.

Security

Ensure you:

  • Keep your access tokens secure
  • Never expose tokens in client-side code
  • Implement proper token refresh mechanisms
  • Use HTTPS for all API requests