-
-
Notifications
You must be signed in to change notification settings - Fork 142
How to receive webhooks from a public channel? #656
-
I successfully created a bot, that receives webhooks, if I chat with the bot directly.
I also want to receive webhooks and handle webhooks from other channels. For example a public channel.
- I added the boot as an Admin to the channel.
- Set allow message from unknown chats to true and added the chat id to the database.
- I set the privacy to disabled.
Did I miss something?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 3 replies
-
Receiving Webhooks from a group works fine.
Beta Was this translation helpful? Give feedback.
All reactions
-
have you tried to log in order to check if any connection is incoming?
Beta Was this translation helpful? Give feedback.
All reactions
-
@fabio-ivona Ciao! I managed to atach bot to channel and i see in table telegraph_chats id 2 , chat_id -10000000001 , name [channel] abc123
Next, i have
protected function handleChatMessage(Stringable $text): void{ $this->reply('TestReplyToAnyText'); }
and if I type in channel any text I see "TestReplyToAnyText" in that channel.
Tell me please how to make
$this->reply('Channel post content.....');
to be sent exactly to my channel from Laravel ?
I mean I want to be able to send text from backend to channel with help of my bot
Beta Was this translation helpful? Give feedback.
All reactions
-
Found solution :)
$channel = TelegraphChat::find(2);
$channel->message('Hello from Laravel backend!')->send();
Beta Was this translation helpful? Give feedback.
All reactions
-
Glad you have found it! ❤️
Beta Was this translation helpful? Give feedback.