Telegram - get HTTP/1.1 403 Forbidden

Hi there,

I use latest version of OPenHAB. I want to send some messages to my mobile phone and the one of my daughter using telegram.

This is my telegram.cfg:


TestA.chatId  = 123456789
TestA.token   = 111111111:ASDFasdfQWERqwerTZUItzui1234YXCV789

TestB.chatId  = 987654321
TestB.token   = 111111111:ASDFasdfQWERqwerTZUItzui1234YXCV789

And this is the command in the rules-file:

sendTelegram("TestA",  "Test message for A")
sendTelegram("TestB",  "Test message for B")

But I get this warning:

2020-11-18 06:50:00.566 [WARN ] [ab.action.telegram.internal.Telegram] - Method failed: HTTP/1.1 403 Forbidden

What I am missing please? Thanks for an help!

That is Telegram Actions v1, right ? You may try and use the v2 Telegram binding.
What is the latest version that you use ? Latest is always relative and is it OH2 or OH3 based ?

As far as I undertand the authentication mechanism that is being used it is based on token and chatid.
Did you try if the token, chatid combination works in the browser by using an URL like:<token>/sendMessage?chat_id=<chatId>&text=testing

where you replace < token > and < chatid > with the related correct information ?

+1 for using the binding

Then you can set it up to poke daughter to do things and receive a response.

Hey you left the lights on do you want me to turn them off for you Y/N


thanks for reply. My OH version is currentyl 2.5.9-1.

@Wolfgang_S: Yes this is working without any problem from within my Chrome browser.

Since the message arrives at my and my daughters phone it is working in OH - but I just wonder why this warning comes up.
Will using Telegram binding v2 be easy in installation? And can I keep my telegram.cfg and rules file?

I didn’t realize that it is a warning only. I was more focused on the 403 error and assumed that it would not work.
Seems that you then can ignore the warning.

Have a look at the link denominator posted. I would say it is an easy, straight forward installation and configuration. Rules and configuration is not that complicated so that you should be able to migrate in a limited amount of time.