Git Product home page Git Product logo

Comments (3)

arcturial avatar arcturial commented on June 2, 2024

The default endpoint URL is currently based on the PORT your bot runs with. You can start the bot on the secure port by passing the PORT or EXPRESS_PORT environment variable to hubot when it starts.

Unfortunately, adding certificates is a bit difficult. Hubot is tracking the issue with SSL in it's main repository hubotio/hubot#727. It seems that Hubot doesn't have all the features of a normal web server.

You can get around this by creating your own Hubot script that starts your own server on the port (with certificates) of your choice and just pass the incoming messages to the robot.adapter object.

You can then configure the adapter endpoing using the TELEGRAM_WEBHOOK environment variable and specifying your custom endpoint.

The other alternative is to use the TELEGRAM_INTERVAL environment variable and set a low polling interval of 1000 milliseconds or so. This way you don't have to worry about HTTPS.

from hubot-telegram.

nspacestd avatar nspacestd commented on June 2, 2024

My request was actually about using a secret endpoint (i.e. one that only Telegram servers know about) rather than a secure one (i.e. encrypted with SSL). Right now the adapter listens for POST requests to /hubot/telegram/receive, but Telegram currently provides no way to make sure these are actually coming from their servers and not from other sources, so they suggest using a secret endpoint, such as one that has the bot token in its path. The PORT and EXPRESS_PORT environmental variables only allow to change the port the adapter listens on, but not the endpoint URL

from hubot-telegram.

arcturial avatar arcturial commented on June 2, 2024

My apologies. It's definitely possible. I will have a look at adding the token into the default endpoint path or perhaps offering another environment variable that can be set to support backwards compatibility. Might be best to just make the endpoint secret by default and people with new versions should just update their endpoint.

from hubot-telegram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.