Skip to content
Advertisement

inline keyboard on telegram error 400 bad request

I wanna send a json encoded keyboard as reply markup but I get error 400 bad requset!

This is how json looks like:

JavaScript

and this is how the code looks like:

JavaScript

I’ve also tried deleting one of the [ ] but it didn’t work.

Advertisement

Answer

I actually find the problem. It was a problem with data size. As Telegram says, the callback data should not be more than 64 bytes

And it can be fixed by:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement