Patoshi パトシ
Patoshi パトシ

Reputation: 23515

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.

Upvotes: 4

Views: 9647

Answers (1)

newsha
newsha

Reputation: 1438

-- 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

Upvotes: 9

Related Questions