Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preventing Telegram Link Previews using a URL redirect site

Currently I have a telegram bot that outputs a URL, but everytime the bot sends a URL telegram creates a link preview. One solution I came up with was pass this URL through a URL redirect service or website to break the link preview. Is there a url redirect service where I can append a URL parameter where it will redirect to that site?

I can code up my own php script that parses the URL parameter, but if a service already exists I rather use that.

like image 611
Patoshi パトシ Avatar asked Oct 22 '25 08:10

Patoshi パトシ


1 Answers

-- Edit: From December 29, 2023 update, to disable previews the option are: --

link_preview_options: {
    is_disabled: true,
},

You can set disable_web_page_preview attribute to true when using sendMessage method.

It will disable link previews for links in this message.

https://core.telegram.org/bots/api#sendmessage

like image 194
newsha Avatar answered Oct 24 '25 06:10

newsha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!