Skip to main content

Get participant count

Gets the total number of chat participants

Function GetParticipantCount(Val Token, Val ChatID) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringBot token
ChatID--chatString, NumberTarget chat ID

Returns: Map Of KeyAndValue - serialized JSON response from Telegram


tip

Method at API documentation: getChatMemberCount


1C:Enterprise/OneScript code example
    Token     = "6129457865:AAFyzNYOAFbu...";
ChannelID = "@testsichee";

Result = OPI_Telegram.GetParticipantCount(Token, ChannelID);
    oint telegram GetParticipantCount \
--token "***" \
--chat "@testsichee"
Result
{
"ok": true,
"result": 2
}