Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: HTTP webhooks are prohibited, but they are allowed in case of using own bot api server #1137

Open
glukinho opened this issue Aug 28, 2024 · 0 comments
Labels

Comments

@glukinho
Copy link

PHP version

8.3.10

irazasyed/telegram-bot-sdk version

v3.14.0

Laravel version (if any)

v11.21.0

Code To Reproduce the bug

I'm using Laravel
base_bot_url in telegram.php set to: 'http://127.0.0.1:8081/bot' because I'm using my own bot API server launched on the same host.

I execute in Tinker:

$webhook_url = 'http://127.0.0.1/api/telegram/my_bot/webhook';
Telegram::bot('my_bot')->setWebhook(['url' => $webhook_url]);

This code gives: Telegram\Bot\Exceptions\TelegramSDKException Invalid URL, should be a HTTPS url.
If I manually set webhook to URL http://127.0.0.1/api/telegram/my_bot/webhook using Telegram Bot API (with CURL for example), everything works fine.
I think HTTP webhooks shouldn't be prohibited because they definitely may exist in Telegram.

Error stacktrace (if any)

No response

@glukinho glukinho added the bug label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant