Notifications
Clear all
[Prusa Connect] Invalid Endpoint URL error in Channels Setup for Telegram bot channel
Hello everyone,
Followed the Prusa help guide on how to create a Telegram notifications, but ran into an "Invalid Endpoint URL" error.
Is this a bug? Has anyone managed to get this to work? Thanks.
Opublikowany : 09/09/2023 1:36 am
Topic starter
answered:
RE: [Prusa Connect] Invalid Endpoint URL error in Channels Setup for Telegram bot channel
Managed to resolve this. tldr; Telegram API instability is the root cause. Steps to resolve, for those who are interested:
- Revoke the current token, and generate a new one.
- Using the new token, send a "getMe" message to check that the bot is authorized to access Telegram API. Should receive something like the following as a response:
{"ok":true,"result":{"id":<your id>,"is_bot":true,"first_name":"your_bots_name","username":"your_bots_username","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":true}}%
- Use the `sendMessage` method to send a test message. For example:
curl "https://api.telegram.org/bot<your_token>/sendMessage?chat_id=<your_chats_id>&text=Hello%20from%20curl"
- You should receive a response. For some undetermined reason, Telegram replied with the following:
{"ok":false,"error_code":400,"description":"Bad Request: group chat was upgraded to a supergroup chat","parameters":{"migrate_to_chat_id":-<another_chat_id>}}%
- Now all that is left to do is to change the original chat-id to the one that was supplied in the previous step.
- Enter those values in the form provided by Prusa Connect.
Opublikowany : 09/09/2023 2:03 am