irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Home Page:https://telegram-bot-sdk.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Channel Group Members

RVP04 opened this issue · comments

commented

PHP version

8.1.3

irazasyed/telegram-bot-sdk version

v3.13.0

Laravel version (if any)

v10.30.0

Code To Reproduce the bug

When I try to use the getChatMember or getChatMembers I get

Telegram\ Bot\ Exceptions \ TelegramResponseException

Bad Request: invalid user_id specified

I am trying with the code

$chatId = 'xxxx';
    return \Telegram\Bot\Laravel\Facades\Telegram::getChatMember(['chat_id' => $chatId]);

Error stacktrace (if any)

No response

In Telegram doc,user_id in the method is required
getchatmember

$chatId = 'xxxx';
$userId = 123
return \Telegram\Bot\Laravel\Facades\Telegram::getChatMember(['chat_id' => $chatId, 'user_id' => $userId]);
commented

I want to all the members from the group not to check whether he is a member

I want to all the members from the group not to check whether he is a member

According to my understanding, telegram-bot-sdk cannot directly obtain all users of the group

But, you can use this personal account based on the telegram MTProto protocol to achieve the functions you need getPwrChat

commented

I am working on laravel application but I don't whether package is available.

This is not possible with Bot API