mahsa jannaty
mahsa jannaty

Reputation: 45

Telegram webhook on laravel not working

I'm trying to make a telegram bot on laravel. I have this package in the project and everything is ok when I want to send a pm to a static chat_id to my own telegram account.

But when I want to send a message to bot in telegram and get a simple response, webhook url isn't calling by telegram!

a few hours ago I have recieved many webhook calls (about 3000) in my log but now it is not working again

for your information: I have this except in my VerifyCsrfToken.php:

protected $except = [
  '/bot'
];

and this is my webhook url: https://api.telegram.org/bot[TOKEN]/setwebhook?url=[URL]

and I have ssl certification on this url!

Upvotes: 3

Views: 2105

Answers (1)

Alexey Mezenin
Alexey Mezenin

Reputation: 163978

Change it to:

protected $except = [
    'bot*'
];

https://laravel.com/docs/5.5/csrf#csrf-excluding-uris

Upvotes: 1

Related Questions