getChatMember
Methods for @BotMembersRobot: checks go through your bot connected to the service. code - the bot code issued by @BotMembersRobot.
GET
/getchatmember/{code}?chat_id=…&user_id=…
Same as getChatMember in the Telegram Bot API: the user's status in a channel or group. Requires paid access. | Parameter | Required | What it is |
|---|---|---|
| code | yes | Bot code from @BotMembersRobot |
| chat_id | yes | ID of a channel or group where the bot is an admin |
| user_id | yes | User's Telegram ID |
bash
curl "https://api.botstat.io/getchatmember/BOT_CODE?chat_id=-1001234567890&user_id=123456789"
Response
ChatMember object from the Telegram Bot API, as is:
json
{
"user": {
"id": 123456789,
"is_bot": false,
"first_name": "Ivan",
"username": "ivan"
},
"status": "member"
}
status: creator, administrator, member, restricted, left or kicked. Errors are the same as in the subscription check, plus an error field with a hint.
Errors come with HTTP 200Check ok and status_code in the response body. If Telegram does not respond within 2 seconds, the request is retried up to 5 times, then status_code 504 comes back.
Was this article helpful?
Didn't find the answer? Contact support