irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
https://telegram-bot-sdk.com
BSD 3-Clause "New" or "Revised" License
3.04k stars 671 forks source link

Getting message list of a channel #1107

Closed art-zhitnik closed 8 months ago

art-zhitnik commented 10 months ago

PHP version

7.4

irazasyed/telegram-bot-sdk version

3.9

Laravel version (if any)

No response

Code To Reproduce the bug

None

Error stacktrace (if any)

Sorry for posting as a bug, but I don't find any way to ask. My case is to parse some open news channel in telegram.

art-zhitnik commented 10 months ago

I hope I can do it with a bot, probably using api method https://core.telegram.org/method/messages.getHistory How can I make api call with your libriry?

irazasyed commented 8 months ago

You're looking at Telegram Core API which is different from Bot API.

You can't retrieve a channel's message unless your bot is added to your channel with appropriate permissions.