Webhook not receiving POST requests from Telegram bot on OpenShift with Tomcat servlet

I’m having trouble with my Telegram bot webhook setup. The bot isn’t sending any HTTPS POST requests to my servlet.

When I call the setWebhook API method, I get a successful response:

{
    "success": true,
    "response": true,
    "message": "Webhook has been configured"
}

My servlet’s doPost method should work regardless of POST parameters, but it never gets triggered when I send messages to the bot. However, when I test the same servlet using a REST client extension, everything works perfectly.

I’ve seen mentions about potential SSL certificate issues, but I assumed OpenShift would handle that automatically. Has anyone encountered similar problems or have suggestions for debugging this?

the same thing happened to me too! openShift should handle ssl certs, but telegram can be really picky abt URLs. try some logging in your doPost method to see if requests get through. also, check your webhook URL for any typos or extra chars.

This usually happens because Telegram’s webhook validation is super picky, even after setWebhook returns success. OpenShift handles SSL certs fine, but Telegram wants specific cipher suites and TLS versions that might not match your setup. I hit this exact problem and found out Telegram was quietly rejecting requests because of certificate chain issues. Test your webhook endpoint with curl using the same SSL settings Telegram uses, or just switch to polling mode with getUpdates temporarily to make sure your bot logic actually works. Also check your servlet container config - your web.xml mapping needs to match your webhook URL exactly, including trailing slashes.

I had the same problem - it was the webhook URL format. Telegram says setWebhook worked, but then does extra validation when actually sending requests. Check that your servlet path is publicly accessible and your OpenShift route is set up right. Use getWebhookInfo to see the current webhook status and any errors Telegram hit when trying to reach your endpoint. Also make sure your servlet maps to the exact path you put in the webhook URL.