SSL Cert Error When Attempting POST for Bearer Token

I’m attempting to learn Python with my son and thought I would do some analytics on Pokemon card prices. I’m just trying to get past step one and get a bearer token and hitting some roadblocks. I’ve queried the developer forums as well as did some legwork in google and I’m not finding anything helpful.

Anything that would point me in the right direction would be very helpful, Thanks!

Stack: Python 3.8.5 (64-bit) - Anaconda3 2020.11
Installed requests, updated certi.

SSLError: HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /token (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)’)))

import requests

url = ""
client_id = "MY_PUBLIC_KEY"
client_secret = "MY_PRIVATE_KEY"

headers = {
        "Content-Type": "application/json"
        ,"Accept": "application/json"
        ,"User-Agent": "MyAppName"

payload = (

response = requests.request("POST",url,headers=headers,data=payload)


It turns out, nothing was wrong with the code, so I’ll leave this here in case it helps anyone else.

There is something wrong with my machine and/or the network I’m on (I’ll continue to do some troubleshooting). I moved the code to a Azure Synapse Spark instance and it had absolutely no problem running.