Get My Profile
Overview
Fetch the signed-in chat participant's own profile. The target is resolved from the Bearer token - no path id is required.
Use this to hydrate the chat shell (sidebar avatar, header name) and the in-app account / profile screen. Returns name, email, role, profile image, and online status.
When to use this endpoint?
Use Get My Profile when:
- Showing the current participant's name and avatar in the chat UI shell.
- Opening chat settings / “My profile” for the signed-in user.
- Confirming the chat session still maps to a valid user after login.
- You need your own record without passing a
userId- prefer this over Get User.
Part of the Chat User APIs (not Platform client profile). Requires the chat user Bearer token and tenant headers.
Response Data
The data object typically includes:
GET
{baseUrl}/api/{apiVersion}/user/profile/me- Authentication
- Required (Bearer token)
- Tenant-scoped
- Yes (tenant DB - requires x-client-id)
Request Headers
Success Response (HTTP 200 OK)
On success, the API returns the signed-in user's profile.
json
{ "success": true, "message": "Profile fetched successfully", "data": { "_id": "6a58...90d", "name": "Smith William", "email": "will.smith@example.com", "isActive": true, "role": "admin", "isOnline": false, "blockedUsers": [], "mutedUntil": null, "isBanned": false, "profileImage": "https://example.com/profile-image.png", "lastSeen": "2026-07-16T09:06:11.727Z", "createdAt": "2026-07-16T09:06:11.730Z", "updatedAt": "2026-07-16T09:06:12.069Z", "__v": 0 }, "error": null}Common Errors
Profile fetch fails when the token is missing, invalid, or expired.
HTTP 401 Unauthorized - No token
json
{ "success": false, "message": "No token, authorization denied", "data": null, "error": "Unauthorized"}Best Practices
- Call once after chat login and cache in client state; refresh after Update My Profile.
- Fall back to initials in the chat header when
profileImageis missing. - Do not pass a user id in the path - identity comes from the token.
- Always send tenant headers with the chat user Bearer token over HTTPS.
Chat profile loaded
Bind name and avatar to the chat shell, then offer Update My Profile from chat settings for self edits.