Comments (9)
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.
I can write a quick example for you but I need to know more about you configuration...
from telegram.
@mukel Hi. Thank you for paying attention to this. I will come a but later with more details.
from telegram.
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.
I am running my bot locally, but I am forwarding port(8443) from Google Cloud Instance to local machine.
from telegram.
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.
@mukel Thank you for instructions. Currently, I am using ngrok for testing purposes.
Good note about trusted Java keystore.
from telegram.
Ping. Did it solve your issue?
from telegram.
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)
- Bot silently stops receiving updates when it gets a message that fails to parse HOT 9
- Remove okhttp dependency from "core" module HOT 1
- Example on how to use `SetMyCommands` HOT 6
- Add `FilterF` and declarative `whenF`
- Support bot API v6
- SSL error: 0A00010B:SSL routines::wrong version number HOT 10
- Support 6.1 API
- SSL with ZIO Webhook using asyncHttpClient HOT 16
- Help to remove menu. HOT 1
- Support underscore in command name HOT 2
- No reconnect on connecton issues HOT 5
- Proxy basic authentification HOT 2
- requirement failed: Exactly one of the optional fields should be used HOT 2
- scala.MatchError on EditMessageMedia HOT 2
- Monetstore and cryptocurrency, services and advertising/marketing Ltd
- Victormonet
- Migrate to Pekko HOT 1
- Bezzi
- Scala 3
- Java 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram.