Skip to content

Problem with web_app in InlineKeyboardButton #1353

@the-lookin

Description

@the-lookin

I try to send button with message, which will open Web App:

This is code:

      $keyboard = [
          "inline_keyboard" => [
              [
                   new InlineKeyboardButton(['text' => 'message', 'web_app' => new WebAppInfo(['url' => 'https://test.com/bot.php'])])
              ]
          ]
      ];
      $result = Request::sendMessage([
        'chat_id' => $chat_id,
        'parse_mode' => 'markdown',
        'text'    => 'Send message',
        'reply_markup' => $keyboard
      ]);```

But I have an error:

[ok] =>
[error_code] => 400
[description] => Bad Request: BUTTON_TYPE_INVALID

Without "web_app" param - all is OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions