P
P
PlayBoyXXX2021-09-14 00:06:19
bash
PlayBoyXXX, 2021-09-14 00:06:19

How to send a clickable message via Telegram Bot API?

You need to send a clickable message through Bota Telegram. (This is done by escaping the text with a backtick (URL code - %60)

curl -s -X POST https://api.telegram.org/bot"$bot_api"/sendMessage -d chat_id="$tg2id" -d text=" Был создан ключ Shadowsocks %0A Сервер: $backup_serv_id %0A Никнейм: ${ssr_user} %0A Порт: ${ssr_port} %0A Ключ: %60${ss_link}%60"


I execute the command, but instead of changing the font, I get this output: `ss_link`
How to make ${ss_link} clickable?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Syrovetsky, 2021-09-14
@PlayBoyXXX

The `sendMessage` handle has a `parse_mode` parameter, you need to pass `MarkdownV2` https://core.telegram.org/bots/api#sendmessage

K
ky0, 2021-09-14
@ky0

You have some kind of leapfrog with quotes, plus - if you url-code characters, that's all, including spaces.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question