3

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.

Patoshi パトシ
  • 21,707
  • 5
  • 29
  • 47

1 Answers1

6

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

newsha
  • 1,288
  • 1
  • 10
  • 13