Telegram Photo DWD

Hello,
I’m trying to send me an picture of the German Weather Warning Center, if a storm or something else comes to my area.

sendTelegramPhoto("MyBot", "https://www.dwd.de/DWD/warnungen/warnapp_gemeinden/json/warnungen_gemeinde_map_de.png", null)	
2019-05-25 21:51:12.842 [WARN ] [ab.action.telegram.internal.Telegram] - Failed to retrieve an image. Received status: HTTP/1.1 404 Not Found

Does anybody knows, why I get the error?

Thanks
Tobias

Fairly obvious.

No :slight_smile: because when you follow the link with your browser, you will see the png :slight_smile:

Does anybody has ideas?

BR
Tobias

You could try turning on debug output for the http package.
Use either org.apache.commons.httpclient.HttpClient or just org.apache.commons.httpclient.

This will probably generate a lot of output, so keep your test period short.

1 Like

I believe that your command is incorrect. See the binding doc:


If you have properly defined the telegram thing then you don’t need anything in the sendTelegramPhoto call except for the URL of the image. If you are trying to send this to a different chat than the default chat defined for your bot, the first parameter in sendTelegramPhoto must be a telegram chat ID which must be passed as a long type.

Right now, because you have a string (“MyBot”) as the first parameter, that’s what the binding is using as the image location and, for obvious reasons, can’t find anything there.

1 Like

Oh good point. I only used Telegram Actions. I didnt recognized, that there is a new Tg Binding. Now it works with the same link.

Thank you!