# Dynatrace API SSL certificate problem: unable to get local issuer certificate

**URL:** <https://community.dynatrace.com/t/dynatrace-api-ssl-certificate-problem-unable-to-get-local-issuer-certificate/10678>\
**Category:** Extensions\
**Tags:** data-privacy-and-product-security, extensions, dynatrace-api\
**Created:** [January 29, 2018, 11:41am UTC](https://community.dynatrace.com/t/dynatrace-api-ssl-certificate-problem-unable-to-get-local-issuer-certificate/10678 "2018-01-29T11:41:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [January 29, 2018, 11:41am UTC](https://community.dynatrace.com/t/dynatrace-api-ssl-certificate-problem-unable-to-get-local-issuer-certificate/10678/1 "2018-01-29T11:41:02Z")

</div>

Hi guys,

When using [https://github.com/Dynatrace/dynatrace-api/blob/ma…](https://github.com/Dynatrace/dynatrace-api/blob/master/ExcelExport/dt-excel.py) (after adding the right url and token) got the follows error: “SSL certificate problem: unable to get local issuer certificate”

 ![15622-smartscape2excel.jpg](https://global.discourse-cdn.com/dynatrace/original/2X/4/4e20193921eabfdec984ecc439e7e1815690766d.jpeg)

Any suggestions?

Yos

---

<div class="post-metadata">

**Author:** ![lucas\_hocker](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lucas_hocker/32/29551_2.png) [@lucas\_hocker](https://community.dynatrace.com/u/lucas_hocker)\
**Post date:** [January 29, 2018, 3:22pm UTC](https://community.dynatrace.com/t/dynatrace-api-ssl-certificate-problem-unable-to-get-local-issuer-certificate/10678/2 "2018-01-29T15:22:07Z")

</div>

Hi Yos,

From the PyCurl error in your screenshot it seems the local CA bundle python is using on your system is outdated. If you try executing an API request from curl on the command line, does it work? I did a quick internet search for “pycurl error 60” and the first few results point to using  
`curl.setopt(pycurl.CAINFO,...)` to set the path to an updated system CA bundle. You would add this right before line 24, `c.perform()`. Alternatively, it looks like you can utilize the python package [certifi](https://pypi.python.org/pypi/certifi) for an updated bundle local to python. Please reach back out if that doesn’t work for you.

Best regards,

Lucas Hocker

Sales Engineer

Dynatrace

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [December 22, 2021, 10:25am UTC](https://community.dynatrace.com/t/dynatrace-api-ssl-certificate-problem-unable-to-get-local-issuer-certificate/10678/3 "2021-12-22T10:25:41Z")

</div>

Hi&nbsp;[@lucas\_hocker](https://community.dynatrace.com/user/32376)

Had some time and changed the pycurl into requests and its works like a charm.

Also added the ability to send env id and token as parameters.

Python file is attached here as txt file

HTH

Yos&nbsp;  
[dt-execl.txt](https://community.dynatrace.com/uploads/short-url/z25dw5Pbm2bnp0FPOZi872zFbfu.txt) (6.99 KB)
