1

I developped an API (endpoint : https://helloworld.mycompanyname that I need to request with a parameter 'key' ). I want to access this API from my front so I'm trying this method :

@app.route('/test/', methods=("POST","GET"))
def test():
   payload = {'key':'****'}
   r = requests.get('https://helloworld.mycompanyname/', params=payload)  
   return r.text

And I have this SSLerror :

requests.exceptions.SSLError: HTTPSConnectionPool(host='helloworld.mycompanyname', port=443): Max retries exceeded with url: /?key=*** (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

How can I fix that ?

userHG
  • 567
  • 4
  • 29
  • https://stackoverflow.com/questions/51768496/ssl-htts-requests-exceptions-sslerror-httpsconnectionpoolhost-google-com-po Check if this helps – SubhashR Feb 26 '20 at 09:57
  • Already checked. I don't want to add 'verify=False' because Adding certificate verification is strongly advised – userHG Feb 26 '20 at 10:05

1 Answers1

0

Which version of python are you using ? If you are using the older version then you end up getting SSL Error try to upgrade to 3.4 or latest. It should resolve your issue.

Tharak Sarvayoni
  • 176
  • 2
  • 14