E
E
enabl32022-03-07 05:34:23
Python
enabl3, 2022-03-07 05:34:23

How to add link to phone number in InlineKeyboardButton?

Good day.
Can you please tell me if it is possible to add a link to a phone number for InlineKeyboardButton?
I do it like this:

phone_number = InlineKeyboardButton(text="Позвонить", url="tel:+1234567890")

While doing this I get an error:
aiogram.utils.exceptions.BadRequest: Inline keyboard button url is invalid

Or are links to the phone not available for this type of button?
If the link is to the site, for example url= https://google.com - then everything works.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
InternetMaster, 2022-03-07
@InternetMaster

In general , or , but telegram blocks such links. If you try to send in another application (for example, SMS, then everything is OK). With the maximum need, you can use the site to give the user a link to the site, and there will already be a "Call" button on it. According to the idea, it should not be so that the browser does not call. tel:77777777777tel://77777777777

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question