Unable to find valid certification path to requested target caused by SSLHandshake Exception while trying to get data from API endpoint


I am trying to get data from an API endpoint of opcenter. While running the script I am getting the error
"caused by IOException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

I have installed the certificate and placed it in folder "C:\Program Files\Inductive Automation\Ignition\data\certificates\supplemental" . I have attached the code as well

url = "......................."
headers = {
    'Authorization': 'Bearer ****** '

myClient = system.net.httpClient()
response = myClient.get(url,headers) 

print response.getText()

Thank you

Your server certificate may be self-signed or signed by an internal CA, and you might need to add that certificate or CA to Ignition's trust store.


Please feel free to reach out to support at support@inductiveautomation.com if you need additional assistance.