Creating a Telegram bot without SSL/HTTPS

Hey everyone! I’m working on a Telegram bot project and I’ve hit a roadblock. My goal is to have the bot connect to my web host, interact with a database, and work with PHP scripts. But here’s the thing: everywhere I look, it seems like I need an SSL certificate. Is that really necessary? I’m wondering if there’s any way to set up and run a Telegram bot without dealing with SSL or HTTPS. Has anyone managed to do this before? I’d love to hear about any workarounds or alternative methods. Thanks in advance for any help or suggestions!

hey jack, have u tried using getUpdates instead of webhooks? it lets u poll for messages without needing SSL. not as fast, but it works. or maybe check out ngrok for testing - it gives u a temp HTTPS url. just remember these might have some downsides. in the long run, proper SSL is prolly best especially if ur handling sensitive stuff.

While it’s true that Telegram strongly recommends using HTTPS for security reasons, there are a few workarounds you could consider. One option is to use the getUpdates method instead of webhooks. This approach involves polling Telegram’s servers for new messages, which doesn’t require SSL. It’s not as efficient as webhooks, but it could work for your project. Another possibility is using a service like ngrok during development. It creates a secure tunnel to your local machine, giving you a temporary HTTPS URL. This can be useful for testing without setting up SSL on your own server. Keep in mind that these alternatives might have limitations or security implications. In the long run, properly implementing SSL/HTTPS is the best practice for Telegram bots, especially when dealing with user data or sensitive information.

I’ve been down this road before, and while SSL is recommended, there are ways around it. In my experience, using the getUpdates method works well for smaller projects. It’s a bit slower, but it gets the job done without the SSL hassle. I’ve used it for a personal bot that interacts with my home automation system.

Another trick I’ve found useful is deploying on platforms like Heroku. They handle the SSL certificate automatically, which is a huge time-saver. I did this for a bot I made for my local community group, and it was surprisingly straightforward.

If you’re set on using your current setup, consider looking into Cloudflare’s Flexible SSL. It’s a middle-ground solution that might work for your needs without requiring major changes to your existing infrastructure.

Just keep in mind that while these workarounds are convenient, they might not be ideal for bots handling sensitive data. In those cases, proper SSL implementation is worth the effort for the security it provides.