Giter VIP home page Giter VIP logo

Comments (9)

mukel avatar mukel commented on May 22, 2024

I've tested the library on Heroku and GAE (long time ago) and the https web hook worked just fine. I usually test it locally using ngrok (also https).
Could you please provide more details, like where you are running your bot, and the webhook configuration you have (you can obfuscate the domains...). Are you using a custom certificate?

from telegram.

mukel avatar mukel commented on May 22, 2024

I can write a quick example for you but I need to know more about you configuration...

from telegram.

aaabramov avatar aaabramov commented on May 22, 2024

@mukel Hi. Thank you for paying attention to this. I will come a but later with more details.

from telegram.

aaabramov avatar aaabramov commented on May 22, 2024

Hi @mukel. In your code I see no place where you are configuring SSLContext as it is described in Server-Side HTTPS Support

    bindingFuture = Http().bindAndHandle(routes, interfaceIp, port)
    bindingFuture.foreach { _ =>
      logger.info(s"Listening on $interfaceIp:$port")
    }

    sys.addShutdownHook {
      Await.ready(shutdown(), 30.seconds)
    }

I am uploading custom .pem certificate to Telegram. What I am doing wrong? All that I want is to accept at least one webhook.

Thank you!

from telegram.

aaabramov avatar aaabramov commented on May 22, 2024

I am running my bot locally, but I am forwarding port(8443) from Google Cloud Instance to local machine.

from telegram.

mukel avatar mukel commented on May 22, 2024

Check #40, @greatbalin fixed the custom certificates, also check the official guide Using self-signed certificates on how the generate them (just in case you missed something).

AFAIK, you don't need to deal with SSL contexts at all, as soon as you have your certificate registered in the trusted Java keystore it should work. Relevant SO thread (Option 1).

The way I test locally relies on the third-party/proxy certificate, e.g. Cloudflare or ngrok, or even Google Cloud's certificate in your case.

Please try adding your certificate to the trusted Java keystore, and ping me back.

from telegram.

aaabramov avatar aaabramov commented on May 22, 2024

@mukel Thank you for instructions. Currently, I am using ngrok for testing purposes.
Good note about trusted Java keystore.

from telegram.

mukel avatar mukel commented on May 22, 2024

Ping. Did it solve your issue?

from telegram.

AlexGruPerm avatar AlexGruPerm commented on May 22, 2024

Hello @mukel. If I set certificate like this:
val cfile :java.io.File= new File("C:\\tcert\\mtspredbot.pem") val inpCertFilePath :java.nio.file.Path = cfile.toPath override val certificate :Option[InputFile] = Option(InputFile(inpCertFilePath))

It means that bot(akka-server) can be used directly for WebHook from telegram servers, instead of using ngrok? Yes, I use ngrok and it's work fine, but I have VDS and want use it as a https destination.
Is't possible with only using your library, without installing nginx or smth else. ? Thanks.

from 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.