# Getting HS API Error

**URL:** <https://community.hubspot.com/t/getting-hs-api-error/103169>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [March 22, 2024, 6:11am UTC](https://community.hubspot.com/t/getting-hs-api-error/103169 "2024-03-22T06:11:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aolvikash](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aolvikash/32/2490_2.png) [@aolvikash](https://community.hubspot.com/u/aolvikash)\
**Post date:** [March 22, 2024, 6:11am UTC](https://community.hubspot.com/t/getting-hs-api-error/103169/1 "2024-03-22T06:11:32Z")

</div>

Hello Team,

Recently, noticed that HS API is started throwing SSL connect error as follows:

```lia-code-sample
HubSpot API Error - HTTP Code 500:
Can't connect to api.hubapi.com:443 (certificate verify failed)
SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

```

Could you please help me here to resolve this issue?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [March 22, 2024, 3:11pm UTC](https://community.hubspot.com/t/getting-hs-api-error/103169/2 "2024-03-22T15:11:35Z")

</div>

Hey, @aolvikash 👋 Here’s the announcement and some next steps [https://community.hubspot.com/t5/Developer-Announcements/SSL-Certificate-Migration-Notice/td-p/944428](https://community.hubspot.com/t5/Developer-Announcements/SSL-Certificate-Migration-Notice/td-p/944428)

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![aolvikash](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aolvikash/32/2490_2.png) [@aolvikash](https://community.hubspot.com/u/aolvikash)\
**Post date:** [March 28, 2024, 7:44am UTC](https://community.hubspot.com/t/getting-hs-api-error/103169/3 "2024-03-28T07:44:23Z")

</div>

Hey Jaycee,

Thanks a lot for your help!!

I have app on Ubuntu server which is using Perl script to do API call to hubspot, Do you have any suggestion how should i go forward to fix this SSL sertificate issue, That will be really great, looking forward to your help!

---

<div class="post-metadata">

**Author:** ![aolvikash](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aolvikash/32/2490_2.png) [@aolvikash](https://community.hubspot.com/u/aolvikash)\
**Post date:** [March 28, 2024, 7:54am UTC](https://community.hubspot.com/t/getting-hs-api-error/103169/4 "2024-03-28T07:54:13Z")

</div>

I belive we need to use below opton to apply API certs:

```lia-code-sample
my $client = REST::Client->new();
$client->getUseragent()->ssl_opts(
 SSL_cert_file => 'cert.pem',
 SSL_key_file => 'key.pem'
);

OR just the ca fileas follows
$client->getUseragent()->ssl_opts(
 SSL_ca_file => 'ca.key',
);

```

But my question is form where we can get the certs pem and keys or ca key ?
