cURL
curl --request GET \ --url http://localhost:2000/profile \ --header 'Authorization: Bearer <token>'
{ "message": "<string>", "data": {} }
Endpoint to get the profile of the logged in user
{ "message": "Profile retrieved successfully", "data": { "_id": "64b7f1a2e4b0a5d3f9c12345", "emails": "[email protected]", "role": "user", "rcExtension": "1234", "phone": "+1-555-555-5555", "department": { "_id": "64b7f2b3e4b0a5d3f9c54321", "name": "Customer Support" }, "permissions": ["compass.dashboard.*", "compass.dashboard.overview"] } }
{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid request" } }
{ "error": { "code": "UNAUTHORIZED", "message": "Missing or invalid authentication token" } }
{ "error": { "code": "USER_NOT_FOUND", "message": "User not found" } }
{ "error": { "code": "SERVER_ERROR", "message": "Internal server error" } }
curl -X GET 'http://localhost:2000/profile' \ -H 'Authorization: Bearer your-jwt-token'
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Was this page helpful?