Skip to content

getChatMemberCount ​

Get the number of members in a chat.

Request ​

POST /:token/getchatmembercount

Parameters ​

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier for the target chat or username

Response ​

Returns the member count as an Integer.

json
{
  "ok": true,
  "result": 256
}

Error Codes ​

CodeDescription
400Bad request parameters, e.g. invalid chat_id format
401Invalid or expired token
403Bot is not a member of this chat and has no access