getChatMemberCount
Get the number of members in a chat.
Request
POST /:token/getchatmembercount
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| chat_id | Integer/String | Yes | Unique identifier for the target chat or username |
Response
Returns the member count as an Integer.
json
{
"ok": true,
"result": 256
}Error Codes
| Code | Description |
|---|---|
| 400 | Bad request parameters, e.g. invalid chat_id format |
| 401 | Invalid or expired token |
| 403 | Bot is not a member of this chat and has no access |
