Retrieves a single member's profile from a group or channel — their role, status, join date and tags.
Request
method is "getChatMember".
| Field |
Type |
Required |
Description |
chat_id |
String |
Yes |
The group or channel the member belongs to. |
user_id |
String |
Yes |
The member to look up. |
app_id |
String |
Yes |
The app the chat belongs to. |
reference |
String |
Optional |
Your id for this request. Echoed back in the response. |
Preconditions
| Requirement |
Why |
"Manage Chats" permission |
Needed to read chat membership. |
| Moderator or admin in the chat |
Member profiles are only visible to privileged roles. |
Response
chatMember
| Field |
Type |
Returned |
Description |
method |
String |
Yes |
"chatMember" |
chatMember |
Chat Member |
Yes |
The member record — user, chat, type, status, member_since, account_type, tags. |
app_id |
String |
Yes |
Echoed from the request. |
reference |
String |
Optional |
Echoed from the request. |
SDKs
| SDK |
Call |
Callback |
| Java |
api.getChatMember(chatId, userId, appId, reference); |
onChatMember(ChatMember chatMember) |
| JavaScript |
api.getChatMember(chatId, userId, appId, reference); |
onChatMember(chatMember) |
| Python |
napi.get_chat_member(chat_id=chat_id, user_id=user_id, app_id=app_id, reference=reference) |
on_chat_member(self, chat_member) |
Example
Request
{
"method": "getChatMember",
"chat_id": "90090684438172188",
"user_id": "90089584789572153",
"app_id": "90090684293000559",
"reference": "123456789"
}
api.getChatMember("90090684438172188", "90089584789572153", "90090684293000559", "123456789");
api.getChatMember("90090684438172188", "90089584789572153", "90090684293000559", "123456789");
napi.get_chat_member(chat_id="90090684438172188", user_id="90089584789572153", app_id="90090684293000559", reference="123456789")
Response
{
"method": "chatMember",
"app_id": "90090684293000559",
"reference": "123456789",
"chatMember": {
"user": {
"id": "90089584789572153"
},
"chat": {
"id": "90090684438172188"
},
"type": "Member",
"status": "Active",
"member_since": 1730111920000,
"account_type": "email",
"tags": null
}
}