# How angular 9 get the contacts data from hubspot

**URL:** <https://community.hubspot.com/t/how-angular-9-get-the-contacts-data-from-hubspot/88927>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [September 4, 2023, 6:03pm UTC](https://community.hubspot.com/t/how-angular-9-get-the-contacts-data-from-hubspot/88927 "2023-09-04T18:03:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PManasingh](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@PManasingh](https://community.hubspot.com/u/PManasingh)\
**Post date:** [September 4, 2023, 6:03pm UTC](https://community.hubspot.com/t/how-angular-9-get-the-contacts-data-from-hubspot/88927/1 "2023-09-04T18:03:26Z")

</div>

I am trying to fetch the contacts data from hubspot using Angular 9 but i am getting below error also all the suggestions are checked by the community people but still the error persist please help me to resolve the below error.

Access to XMLHttpRequest at ‘[https://api.hubapi.com/crm/v3/objects/contacts](https://api.hubapi.com/crm/v3/objects/contacts)’ from origin ‘[https://localhost:44475](https://localhost:44475)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.  
home.component.ts:31 GET [https://api.hubapi.com/crm/v3/objects/contacts](https://api.hubapi.com/crm/v3/objects/contacts) net::ERR\_FAILED 401

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [September 5, 2023, 2:21am UTC](https://community.hubspot.com/t/how-angular-9-get-the-contacts-data-from-hubspot/88927/2 "2023-09-05T02:21:42Z")

</div>

Hi @PManasingh 👋

This has been covered in the HubSpot Community previously. See the following posts with accepted solutions:

1. [https://community.hubspot.com/t5/APIs-Integrations/CORS-issue/m-p/304553](https://community.hubspot.com/t5/APIs-Integrations/CORS-issue/m-p/304553)
2. [https://community.hubspot.com/t5/APIs-Integrations/How-to-fix-cors-is-not-allowing-API-request-issue/m-p/459610](https://community.hubspot.com/t5/APIs-Integrations/How-to-fix-cors-is-not-allowing-API-request-issue/m-p/459610)

The key piece of related HubSpot documentation can be reviewed [here](https://legacydocs.hubspot.com/docs/faq/do-hubspot-apis-support-ajax-request#:~:text=For%20the%20most%20part%2C%20the,re%20using%20for%20the%20request.). Effectively, due to security concerns, the great majority of HubSpot API endpoints do not accept requests made from web browsers. You’ll need to handle most requests to HubSpot APIs via the backend.

I hope that proves useful. Please let me know if you have any follow-up questions.
