I’m installing a server for my website, using nginx. I need to run a script on the same server that tries to access the google translate api (python library googletrans) which uses HTTP/2.
It worked but once I ran certbot to get SSL I can no longer access the API.
Are you saying that your script can't run at all now or that your script runs, but gives an error from Google at the moment it tries to connect to the Google API? In other words, are you seeing a 503 error from your nginx, or from Google's API?
Do you also see that if you run your script on the command line or in an interactive Python interpreter? Do you have to have a particular API key or credential in order to access this API?
I think this is very likely to be a coincidence because I don’t think Certbot would change anything that affects the success of this API request. Can you get any other debugging information from the API about why the request was rejected?
This is the message of the HTML response the API gets, I suppose it’s just an issue with the serve and like you said it was a coincidence that it worked before, or it just had a very limited number of times it could work.
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<b>About this page</b><br><br>Our systems have detected unusual traffic from your compu$
er network. This page checks to see if it's really you sending the requests, and n$
t a robot. Why did this happen?</a><br><br>
This page appears when Google automatically detects requests coming from your computer $etwork which appear to be in violation of the. The block will expire shortly after those requests stop. In the
meantime, solving the above CAPTCHA will let you continue to use our services.<br><br>T$is traffic may have been sent by malicious software, a browser plug-in, or a script tha$ sends automated requests. If you share your network connection, ask your administrator
for help — a different computer using the same IP address may be responsible.
Sometimes you
may be asked to solve the CAPTCHA if you are using advanced terms that robots are known
to use, or sending requests very quickly.
</div>