Telegram Channel Error: invalid URL

  • Used Zammad version: 6.3.1
  • Used Zammad installation type: package
  • Operating system: Debian 12
  • Browser + version: Chrome (newest version)

Expected behavior:

  • Adding a Telegram channel should work

Actual behavior:

  • It doesn’t work. The error message is: The webhook could not be saved by Telegram, seems to be an invalid URL.

Steps to reproduce the behavior:

  • Set up an telegram channel.

From production.log (I changed the API key in some parts):

I, [2024-07-31T18:54:59.230501#26717-150260]  INFO -- : Started POST "/api/v1/channels_telegram" for 192.168.101.0 at 2024-07-31 18:54:59 +0200
I, [2024-07-31T18:54:59.254174#26717-150260]  INFO -- : Processing by ChannelsTelegramController#add as JSON
I, [2024-07-31T18:54:59.254237#26717-150260]  INFO -- :   Parameters: {"api_token"=>"6955755822:AAEOmKKA88DdKLUhVP6sJyH-hjXsYsZSOCc", "welcome"=>"Willkommen im Helpdesk. Bitte stellen Sie mir eine Frage.", "goodbye"=>"Auf Wiedersehen.", "group_id"=>"1"}
E, [2024-07-31T18:54:59.589601#26717-150260] ERROR -- : The webhook could not be saved by Telegram, seems to be an invalid URL. (Exceptions::UnprocessableEntity)
app/controllers/channels_telegram_controller.rb:24:in `rescue in add'
app/controllers/channels_telegram_controller.rb:21:in `add'

I just tested it on my test instance works fine.

You could try to check your token is valid via shell:

root> zammad run rails c
[3] pry(main)> TelegramHelper.check_token('5440041111:xxx').id
=> 123123123

Does this work?

Also check if your FQDN and http type is set properly.

[4] pry(main)> Setting.get('http_type')
=> "https"
[5] pry(main)> Setting.get('fqdn')
=> "rolf.zammad.com"
1 Like

I just tried it. Looks got, but still the same error inside Zammad.

Loading production environment (Rails 7.0.8.1)
[1] pry(main)> TelegramHelper.check_token('6955123822:AAEOmSSBxxxbKLUhVP6sJyH-hjWjZsxxxCc').id
=> 6955755123
[2] pry(main)> Setting.get('http_type')
=> "https"
[3] pry(main)> Setting.get('fqdn')

=> "zammad.my-domain.de"