Any way to open an app from Telegram bot?

Viewed 2208

I've coded a Telegram bot (python-telegram-bot) and I would like to know if there's a way to open an app from the bot.

To be more accurate, the bot searches torrent links and the original idea was to send that links directly to qBitTorrent in the user's computer but unfortunately I'm stuck in that step, so for the moment I though about give the user the magnet link so it can be pasted in the qBitTorrent app. The thing is that it would great to automaticly open the app from the bot.

Thanks in advance!

4 Answers

I've also stuck on this problem. I've tried to open another app via URI, for example:

things://add?title=My%20new%20task

The example above shows my try to open the macOS application called Things.

The main answer is: Telegram doesn't allow to open external applications from bot and doesn't allow use any protocol in URI, except for http and tg.

I think, you can use 3rd-party (or your one) service, which will redirect you on any page that you will ask. Your URL may be a URI to your app: your mobile/PC browser can redirect you directly to the app.

Generally speaking, you're right: one Android app is able to start another app.

However, in this case, this is not your app, we're talking about, but you want another app (Telegram) to open another app. So you have to rely on what that app (Telegram) provides you with their API.

You can have a look at Telegram's bot API at https://core.telegram.org/bots/api There is no method to execute commands or open another app. So it will not be possible for you to open another app with your Telegram bot.

I was also trying to do this, but that was not possible. But as workaround you can make a simple site that opens the app and make Telegram open that.

Related