admin管理员组

文章数量:1401825

I have the following code:

  inline_keyboard: [
    [{ text: 'Authorize', callback_data: '1', url: '' }],
  ],

When I press the button that es out this code, the resulting url is modified to:

tg://unsafe_url?url=https%3A%2F%2Fgoogle%2F

Then, when the user presses the button, a confirmation modal appears.

I've seen other bots with url buttons that don't have that confirmation button. For example connects with telegram and has buttons that I guess are safe.

The telegram documentation doesn't mention unsafe urls:

I'd like to avoid that modal and go straight to the link. Is there some approval process that needs to happen?

I have the following code:

  inline_keyboard: [
    [{ text: 'Authorize', callback_data: '1', url: 'https://google.' }],
  ],

When I press the button that es out this code, the resulting url is modified to:

tg://unsafe_url?url=https%3A%2F%2Fgoogle.%2F

Then, when the user presses the button, a confirmation modal appears.

I've seen other bots with url buttons that don't have that confirmation button. For example https://ifttt. connects with telegram and has buttons that I guess are safe.

The telegram documentation doesn't mention unsafe urls: https://core.telegram/bots/api#inlinekeyboardbutton

I'd like to avoid that modal and go straight to the link. Is there some approval process that needs to happen?

Share Improve this question edited Jun 3, 2021 at 21:16 TylerH 21.1k78 gold badges79 silver badges114 bronze badges asked Nov 15, 2017 at 16:29 bernatfortetbernatfortet 2,3325 gold badges25 silver badges29 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

IFTTT is "verified" bot so it doesn't show any confirmation windows. For any other bot, if you "hide" URL in text, such window will be shown (so that user knows what website he opens).
Some clients (for example, Telegram Desktop) don't show confirmation windows for telegram domain.

本文标签: javascriptHow to show telegram bot inline keyboard button with safe urlStack Overflow