Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to receive webhooks from a public channel? #656

Unanswered
AlexanderFalkenberg asked this question in Q&A
Discussion options

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?

You must be logged in to vote

Replies: 2 comments 3 replies

Comment options

Receiving Webhooks from a group works fine.

You must be logged in to vote
1 reply
Comment options

have you tried to log in order to check if any connection is incoming?

Comment options

@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

You must be logged in to vote
2 replies
Comment options

Found solution :)

$channel = TelegraphChat::find(2);
$channel->message('Hello from Laravel backend!')->send();
Comment options

Glad you have found it! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #655 on October 07, 2024 11:23.

AltStyle によって変換されたページ (->オリジナル) /