Message text by Bot as:
Click to Open URL
URL is http://www.example.com/
There is two way to give the option to open the URL in bot-message by the user as:
API endpoint- https://api.telegram.org/bot{MENTION_YOUR_BOT_TOKEN*}/sendMessage
API method- GET
hit the API with this raw JSON data-
{
"chat_id" : MENTION_USER_CHAT_ID*,
"text" : "Click to Open [URL](http://example.com)",
"parse_mode" : "markdown"
}
hit the API with this raw JSON data-
{
"chat_id" : MENTION_USER_CHAT_ID*,
"text" : "Click to Open URL",
"parse_mode" : "markdown",
"reply_markup" : {
"inline_keyboard" : [
[
{
"text" : "Open link",
"url" : "http://example.com"
}
]
]
}
}
Note: replace * marked variable as per your data.
© 2022 - 2024 — McMap. All rights reserved.