RCecinati
RCecinati

Reputation: 31

SendMessage in Telegram bot with ReplyKeboardMarkup stops working after update

I have a weird problem. I have an application (a bot) sending messages back to the user. The messages are generally (but may be not) equipped with a keyboard (reply_markup=ReplyKeboardMarkup) on which the user chooses the next option. The application is based on Ubuntu 14.04 > Tomcat 5 > Coldfusion 16 > Telegram bot API 4. Everything has been working as a breeze (and it still does!).

Since I want to upgrade my aged server, I have been struggling on many recipes of server (Ubuntu 18.04 LTS or 20.04 LTS), Coldfusion (16 , 18, as well as Lucee, Openbluedragon) . It seems that Telegram bot API 5 are on line, I cannot choose.

The problem is that SendMessage equipped with reply_markup result in a 500 error, wilst the same message without the keyboard is accepted and sent smoothly. The keyboard has been carved to the bone, such as :

mykeyboard='{"keyboard":[["A","B"]],"one_time_keyboard":"true"} '

I have tried GET or POST methods in HTTP. I could understand some difference in migration from API 4 to API 5, but the very same API 5 keeps working with my application on the production server... headache. Can anybody show me a way to understand? Thank you

Upvotes: 0

Views: 239

Answers (1)

RCecinati
RCecinati

Reputation: 31

After the long puzzle, here's the answer. It seems that in API 5, in the definition of a keyboard, the
"one_time_keyboard" clause is no longer supported. Just tease it away: mykeyboard='{"keyboard":[["A","B"]]} '

and it will run again

:-(

Upvotes: 0

Related Questions