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

**URL:** <https://forum.inductiveautomation.com/t/unable-to-find-valid-certification-path-to-requested-target-caused-by-sslhandshake-exception-while-trying-to-get-data-from-api-endpoint/79833>\
**Category:** Ignition\
**Created:** [September 29, 2023, 11:54am UTC](https://forum.inductiveautomation.com/t/unable-to-find-valid-certification-path-to-requested-target-caused-by-sslhandshake-exception-while-trying-to-get-data-from-api-endpoint/79833 "2023-09-29T11:54:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvsagar95](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dvsagar95](https://forum.inductiveautomation.com/u/dvsagar95)\
**Post date:** [September 29, 2023, 11:54am UTC](https://forum.inductiveautomation.com/t/unable-to-find-valid-certification-path-to-requested-target-caused-by-sslhandshake-exception-while-trying-to-get-data-from-api-endpoint/79833/1 "2023-09-29T11:54:39Z")

</div>

Hi,

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

```auto
url = "......................."
headers = {
    'Authorization': 'Bearer ******'
} 

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

print response.getText()

```

Thank you

---

<div class="post-metadata">

**Author:** ![Ben\_Eklund](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ben_eklund/32/40758_2.png) [@Ben\_Eklund](https://forum.inductiveautomation.com/u/Ben_Eklund)\
**Post date:** [October 2, 2023, 10:00pm UTC](https://forum.inductiveautomation.com/t/unable-to-find-valid-certification-path-to-requested-target-caused-by-sslhandshake-exception-while-trying-to-get-data-from-api-endpoint/79833/2 "2023-10-02T22:00:02Z")

</div>

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.

[https://docs.inductiveautomation.com/display/DOC81/Security+Certificates#SecurityCertificates-AddingSecurityCertificatesintoKeyStores](https://docs.inductiveautomation.com/display/DOC81/Security+Certificates#SecurityCertificates-AddingSecurityCertificatesintoKeyStores)

Please feel free to reach out to support at [support@inductiveautomation.com](mailto:support@inductiveautomation.com) if you need additional assistance.
