The error message CERTIFICATE_VERIFY_FAILED that you are facing while making API calls via Python is a type of standard error that users using a Python environment usually face. The error occurs when making HTTPS requests using the requests module in Python.
When the client’s browser affirms that the SSL certificate is valid and authentic, it establishes the connection. But if the client cannot confirm the server’s originality through the Secure Socket Layer certificate, the certificate_verify_failed error will pop up. There are different reasons such as:-
1) Expired or Invalid SSL Certificate
2) The issue with the SSL Certificate Chain
3) Obsolete Python Default Certificates
As, their many ways to fix the error, you need to understand it in detail. I found the helpful resource guide:- https://cheapsslweb.com/blog/ssl-certificate-verify-failed-error-in-python/ for the error that was being faced.
I hope it helps!