My web server is (include version): nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 20.04.1 LTS
I can login to a root shell on my machine (yes or no, or I don't know): yes
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 0.40.0
I'm running a daphne server using the following command : daphne -u /run/daphne/daphne%(process_num)d.sock -e ssl:443:privateKey=/etc/letsencrypt/live/api.quickchat.ai/privkey.pem:certKey=/etc/letsencrypt/live/api.quickchat.ai/fullchain.pem --access-log - xxx:application
According to this webhook guide (core.telegram.org/bots/webhooks), incomplete chain indicates that there are some missing intermediate certificates in fullchain.pem and that I need to provide them in the correct order.
I've tried including some from letsencrypt.org/certificates but no luck so far. Could you please provide some guidance on what the problem could be?
Another piece of evidence is when I hit my server with a POST request using the Python requests package, it says: certificate verify failed: unable to get local issuer certificate
As you are using certbot and nginx you should point ssl_certificate directive in nginx to fullchain.pem (this file includes your cert and the intermediate cert).
That was the first thing I'd tried and now I think it's possible there's something wrong in my Nginx config. Do you happen to have an example Nginx config where that's set up correctly?