skip to Main Content

I create game with BotFather and send this game with “sendGame” function to user, but i not understand how launch game when user press start button?

From API:

When this button is pressed, your bot gets a CallbackQuery with the game_short_name of the requested game.

My bot gets this CallbackQuery, but what next step?
I try send message with my game url (http://192.168.1.10/game.html – this game i can launch on pc or phone browser, work fine), but this not work inside telegram…

Can somebody help?

Thanks!

2

Answers


  1. When the button is pressed the “callback_query” is invoked.

    Using nodejs api I’m sending the link to the game in this way:

    bot.on("callback_query", function(callbackQuery) {
       bot.answerCallbackQuery(callbackQuery.id, gameLink, true, {url: gameLink});  
    });
    
    Login or Signup to reply.
  2. I’ve been experienced the same problem, game comes up with white black screen,

    When I try to open it with telegram desktop, which launches the game in browsers, it returns an error about HTTPS.

    So I try to send my game URL using HTTPS like https://mygame.com then it works

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search