5 ms·
Telegram Middleman Bot – Push Notifications as easy as POST
- ATsch 9y agoI have not looked at this in detail, but I can't see what advantages this has over just sending a simple http request like this: https://api.telegram.com/botTOKEN/sendMessage?id=YOUR_ID&message="your servers are on fire" because that's all you need as far as I know. Works via GET, POST, PUT, everything. Only thing I could see is being able to switch it out for other services easier.
- n1try 9y agoYou're right, but you'd need your own specific Telegram-internal user id so that your message will only be routed to your specific chat. With my little piece of code, n people can register at 1 bot. Without it you would either have to figure out your user id first or have n separate bots for n people. Of course, the advantage is not too dramatic ;-) And yes, the ability to link the bot to further services than only Telegram is another plus.
- angelsl 9y agoYou can get your own (or group's) chat ID with @get_id_bot, if you don't want to just get it yourself via `getUpdates`.
- soulwatcher 9y agoIs there any limit to the number of messages stored in a telegram conversation? Many users report previous messages being deleted without a warning http://telegramgeeks.com/2016/02/telegram-only-shows-us-the-last-million-messages/ http://telegramgeeks.com/2016/02/telegram-only-shows-us-the-...
- roryisok 9y agoThe cut off seems to be a million messages, seems like enough to me
- dingo_bat 9y agoI've seen my father manually clear all his whatsapp chats at the end of the week. 1 million is definitely enough for everyone but somebody who's not using telegram for chat.
- roryisok 9y agoAs far as I understand it you can't scroll back further than a million, so if you were using this for notifications, you wouldn't be able to see what your n-1,000,000th notification was. I could be misinterpreting, but if I'm right I still don't see it as much of a problem.
- gravypod 9y agoWhy is setting up a bush notification system so difficult that it's easier to piggy back on telegram? I have a project I want to do that involves making your own PUSH server (for battery reasons). Would it be difficult to setup
- n1try 9y agoI'd be interested in that project, can you show it?
- gravypod 9y agoI haven't made it. I've just started thinking about what I'd need to get it done. I'm a systems dev not an Android app person. I want to make a thing that will forward my SMSs to a webpage so I can read them online and I want to be able to start conversation, reply to conversations, etc. I want it to be open source and free. I'm not really interested in making it, I just want it.
- swatthatfly 9y agolook at Pushbullet, as a browser extension.
- gravypod 9y agoThis is not self hosted, open source, nor free.
- lighthazard 9y agoIFTTT can do this for you without programming work. Requires your phone because texting requires money.
- iuguy 9y ago> And they require your little server-side script to include some SMTP library and connect to a mail server. That's too heavyweight just to get some short information. Really? Building and deploying a bot made in an arbitrary language is less onerous than registering for a Gmail account to send mail reports through? Perhaps it's just the author's sense of humour, but this didn't strike me as helpful at all. Notifications can be handy for some things, email for other things. Depends on the person. But it's not hard to set up an email account. That's partly why it's still around.
- dingo_bat 9y agoTelegram really deserves more attention than it gets. It has the largest feature set, best multi-platform support with true desktop clients, awesome/fast mobile apps and a large part of the code is open source. What's not to love? Just that none of my friends use it :/
- lou1306 9y agoAnd while I know we are an endangered species, I have to say their support for Windows 10 mobile is top notch. I find their app is better than Whatsapp. Too bad the network effect is a thing, and also their approach to crypto might put you off.
- dingo_bat 9y ago> approach to crypto might put you off It doesn't, anymore than whatsapp. Whatsapp says they have end-end encryption. Has anyone verified it independently? They say they use Signal's tech. Has anybody verified that the app doesn't just take screenshots of the screen and send them to facebook for data mining? When your app is closed source, all claims about security and encryption are meaningless, unless some solid auditing is done.
- reitanqild 9y agoAs much as I am a fan of Telegram[0] I still have to admit that I guess the WhatsApp crypto is better. [0]: my threat model sees Facebook and snooping kids as a bigger risk to me than NSA or FSB. It also says that if those guys come after me I've lost anyway.
- mullen 9y agoSame could be said of Telegram. Plus, we know their encryption is not really that great because no real encryption expert will stand behind Telegram's encryption and Telegram says "Trust us" when it comes to the subject of their encryption. Signal tech is open source, can be checked and has been checked. I am pretty sure that if Whatsapp was lying about using the Signal encryption libraries, word would have leaked out of Whatsapp by now. On top of that, I would trust Moxie 100 times more than I would of the owner of Telegram. Plus, the idea that Whatsapp is taking screen shots and sending it to Facebook is pretty silly. It would be really simple for them to have the messages copied; one going to true receiver and one going to the Facebook servers. There is no need for elaborate spying by Whatsapp, it would be really simple for them to spy on you if they wanted to. * I am not calling the owner of Telegram dishonest, but in the Moxie vs Pavel Durov debate, I am going with Moxie.
- m88m 9y agoso...zapier?
- slackoverflower 9y agoIs there something like this for Facebook Messenger?
- fishywang 9y agoShameless plug: I did something similar earlier this year[1]. But instead of running the bot locally, I run it on Google App Engine to provide an HTTPS API. I also have an Android app to call the API to forward Android notifications. My motivation is a little bit different. I made this because Telegram has great Android Auto support, and also has an easy to use Bots API, so I can convert non-Android-Auto-compatible notifications into Android Auto notifications. I explained my motivation in detail in a blog post. [2] [1] https://github.com/fishy/notifbot https://github.com/fishy/notifbot [2] https://wang.yuxuan.org/blog/item/2017/03/smartthings-myq-and-scala https://wang.yuxuan.org/blog/item/2017/03/smartthings-myq-an...
- JepZ 9y agoIt's funny to see such projects while one of the main reasons to built Telegram in the first place was to built something with a simple http api (vs. the non-http XMPP api) ;-)
- cmaxwell 9y agoHahaha... I wrote almost the exact same thing in Go a few months ago (didn't open source it because I am a selfish fucker). Edit: Actually upon further inspection, mine is a little different in that I have a settings.json file that has the bottoken so it isn't in the code. Also I have an allowed users list in the settings.json file and only users in that list are able to interact with the bot (/subscribe, /unsubscribe). Once a user is subscribed then they get all notifications. So it is more of a broadcast type usecase.