Use this method to get the chat member's profile.
Request Parameters
Field | Type | Required | Description |
method | String | Yes | "getChatMember" |
app_id | String | Yes | Unique identifier for the App. |
chat_id | String | Yes | Unique identifier for the Group or Channel where the member belongs. |
user_id | String | Yes | Unique identifier for the user member. |
reference | String | Optional | Unique identifier for the request. This reference will be echoed in the response. |
Example Request
json{ "method": "getChatMember", "app_id": "123456", "chat_id": "789012", "user_id": "345678", "reference": "request_001" }
đ Notes:
- This method allows retrieving profile details of a specific user in a Group or Channel.
- The
reference
field helps track requests and will be included in the response.
Would you like to include an example response? đ
Preconditions for API Functionality
The following table outlines the preconditions that must be met for the API to function correctly. Failure to meet these conditions may result in errors or unexpected behavior.
Condition | Description |
API must have "Manage Chats" permission | The API needs "Manage Chats" permission to manage chats within the app. |
API must be a moderator or an admin in the chat | The API requires admin privileges in the chat to execute view or creation actions. |
Response:
chatMember
â
On success, the
chatMember
method is returned with an echo of the chatMember
object. Field | Type | Returned | Description |
method | String | Yes | "chatMember" |
app_id | String | Yes | Unique identifier for App. |
chatMember | Yes | Chat Member Object. | |
reference | String | Optional | Unique identifier echoed from the request. |
Example:
Requests
json{ "method": "getChatMember", "app_id": "90090684293000559", "chat_id": "90090684438172188", "user_id": "90089584789572153", "reference": "123456789", }
javaapi.getChatMember(incomingMsg.getChat().getId(), incomingMsg.getFrom().getId());
javascriptapi.getChatMember(chat.id, user.id);
pythonnapi.get_chat_member("chatId", "userId")
Response
json{ "method": "chatMember", "app_id": "90090684293000559", "chatMember": { "member_since": 1730111920000, "account_type": "email", "chat": { "id": "90090684438172188" }, "type": "Member", "user": { "id": "90089584789572153" }, "status": "Active", "tags": null }, "reference": "123456789", }