Get user
Get one trader's name, username, email, avatar, online status and last sign-in, by their internal record ID or email.
- Method
- GET
- Path
https://api.returning.ai / v1/ communities/ {communityId}/ users/ {userId} - Permission
- None
- Retries
- Read-only; exact retries are safe
When to use this
- You have a trader's internal record ID or email and want their public profile for your own tools.
- You want to know whether a trader is online right now, or when they last signed in.
- You want only a few profile fields, such as the email and platform user ID.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- NoneAny Community API key for this community works
Send a Community API key as Authorization: Bearer <API_KEY>, and keep it on your server. No specific permission is needed, so any key for your community works. communityId in the path must be the community that owns your key; another community's ID returns 401.
Behaviour#
userId is matched as an internal record ID when it looks like one, and as an email otherwise. Email matching ignores case. Usernames and platform user IDs don't match, so they return 404.
A deleted trader is still returned here. Get User Data returns 404 for the same trader, so use it when you need to know whether an account is still active. Profile changes can take a short time to show.
Any query parameter switches the response to field selection: only the fields you set to true come back. A parameter that isn't a field name, such as page=1, or a field set to false, returns 200 with an empty data object. To get every field, send no query string.
Request#
Path parameters#
Query parameters#
true to include _id. Sending any query parameter returns only the fields set to true.Egtrue
true to include id, the platform user ID.Egtrue
true to include avatar.Egtrue
true to include displayName.Egtrue
true to include username.Egtrue
true to include firstName.Egtrue
true to include lastName.Egtrue
true to include email.Egtrue
true to include isOnline.Egtrue
true to include lastLogin.Egtrue
Headers#
RuleBearer <API_KEY>
curl --request GET \
--url 'https://api.returning.ai/v1/communities/66f000000000000000000010/users/<userObjectId>' \
--header 'Authorization: Bearer <API_KEY>'
Response#
A 200 returns one trader in data, not a list. meta has only status and statusCode.
Eg{"status": "success", "statusCode": 200}
Eg"success"
Eg200
Eg"Get user success."
true.Eg{ ... }
Eg"<userObjectId>"
Eg3247779
null.RuleNullable
Egnull
Eg"Sample Trader"
Eg"sample_trader"
******** when the trader's privacy settings hide it.Eg"Sample"
******** when hidden.Eg"Trader"
******** when hidden.Eg"trader@example.com"
true while the trader is online.Egfalse
RuleDate-time
Eg"2026-09-26T08:30:00.000Z"
{
"meta": {
"status": "success",
"statusCode": 200
},
"message": "Get user success.",
"data": {
"_id": "<userObjectId>",
"id": 3247779,
"avatar": null,
"displayName": "Sample Trader",
"username": "sample_trader",
"firstName": "Sample",
"lastName": "Trader",
"email": "trader@example.com",
"isOnline": false,
"lastLogin": "2026-09-26T08:30:00.000Z"
}
}
Errors#
Errors on this endpoint have no machine-readable code; branch on the HTTP status and read detail. Without an Authorization header the 401 body is not JSON.
Fix the request02
communityId isn't a 24-character hex ID. detail.communityId says Community ID is required even when you sent a value.Token is wrong.), or communityId isn't the community that owns your key (User can only get your own information!). Send a current key and your own community's ID.Fix the data01
userId. Send the internal record ID or the email; for a platform user ID, use Get User Data.Retry with backoff01
{
"meta": {
"status": "error",
"statusCode": 400
},
"message": "Get user validation error.",
"detail": {
"communityId": "Community ID is required"
},
"solution": "Check your params in request and try again"
}