skip to Main Content

After searching all over the web, I am forced to ask: What can I use to send messages using the Telegram API? JavaScript or PHP preferably.
I have a group of friends that I wish I could tell through certain events on the website.

Here’s an interesting link: http://reyero.net/es/node/263

Update

5

Answers


  1. Check this link: https://github.com/zhukov/webogram this is a chrome app using javascript.

    API can found here: https://core.telegram.org/api

    Other applications using the api can found here: https://telegram.org/apps

    use the source luke 🙂

    I would not do it in javascript because you have to give alle the authentication infos to the client.

    Login or Signup to reply.
  2. You can use our REST API for Telegram at http://jaconda.im

    It is much easier to use, because we take care of stability and deliverability of your messages.

    Just create an account with Jaconda, and besides hundreds of services, you will be able to send and receive messages over HTTP.

    Login or Signup to reply.
  3. I use NodeJS for a Telegram bot; with NodeJS you can use a webhook or some polling to retreive information that is placed in a website and take it back to Telegram in any format you like.

    I use this particular code to extract an ever-changing dollar value (but the trigger is not the change but a command that pulls it; this, I hope, you can change if you want).

    bot.onText(//dolar/, function (msg) {
        request('https://twitter.com/DolarToday', function (error, response, html) {
            if (!error && response.statusCode == 200) {
                var loadedHTML = cheerio.load(html);
                var contentContainer = loadedHTML('p.ProfileHeaderCard-bio').text();
                var soughtContent = contentContainer.substring(contentContainer.search("Bs."), contentContainer.search(" y el"));
                return bot.sendMessage(msg.chat.id, soughtContent); //outputs a value like `Bs. 1904,48`
            } else {
                console.log(error);
            }
        });
        console.log('Sent dollar value');
    });
    

    To do this you need three modules: node-telegram-bot-api for the bot interaction with Telegram, request for the http access and cheerio for the jQuery select and pull.

    Login or Signup to reply.
  4. Install ChatBro module into your site. Set a few params, done. Even lets Google archive your chats to increase search results.

    https://www.chatbro.com/en/

    Login or Signup to reply.
  5. Simple JS library to operate the calls to Telegram API servers using Javascript: https://github.com/sunriselink/TelegramApi

    That’s what you have been looking for, and me too.

    Works this way (from the README.md):

    telegramApi.getUserInfo().then(function(user) {
    if (user.id) {
        // You have already signed in
    } else {
        // Log in
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search