# CORS issue

**URL:** <https://community.hubspot.com/t/cors-issue/17467>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [November 28, 2019, 2:42am UTC](https://community.hubspot.com/t/cors-issue/17467 "2019-11-28T02:42:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dannymurong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dannymurong/32/104913_2.png) [@dannymurong](https://community.hubspot.com/u/dannymurong)\
**Post date:** [November 28, 2019, 2:42am UTC](https://community.hubspot.com/t/cors-issue/17467/1 "2019-11-28T02:42:30Z")

</div>

Hi,

Our client is exploring to retrieve a Contact record via a custom form, and allow their ground staff to update a property of the record and submit back to HubSpot.

We are aware that in order to invoke HubSpot APIs, we need to use server-side languages. I am trying to find a workaround for the above scenario by “hosting” the custom form on a Landing Page, in hopes of using JS AJAX to retrieve a contact record, update a property and submit back to HubSpot.

With the above mentioned use case, is there any other workaround that you can share?

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [December 9, 2019, 10:23am UTC](https://community.hubspot.com/t/cors-issue/17467/2 "2019-12-09T10:23:56Z")

</div>

Hey @dannymurong

I apologize for the delay in getting back to you. I am wondering if you were able to resolve this or if you still need assistance on this matter?

Thank you

Sharon

---

<div class="post-metadata">

**Author:** ![dannymurong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dannymurong/32/104913_2.png) [@dannymurong](https://community.hubspot.com/u/dannymurong)\
**Post date:** [December 9, 2019, 10:31am UTC](https://community.hubspot.com/t/cors-issue/17467/3 "2019-12-09T10:31:19Z")

</div>

hey @sharonlicari ,

Yes I will still need assistance on this matter.

Appreciate your advice.

Thanks,

Danny

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [December 9, 2019, 11:25am UTC](https://community.hubspot.com/t/cors-issue/17467/4 "2019-12-09T11:25:13Z")

</div>

Hi @dannymurong

For the most part, the HubSpot APIs do not support support cross-origin (CORS) AJAX requests. Making the request client-side using JavaScript would expose any authentication you’re using for the request.

In order to use JavaScript/AJAX, you would need to make the request (excluding any authentication) to an external server that could then add the needed authentication and make requests to HubSpot’s APIs server-side.

The exceptions to this rule are:

- The [Submit form data (AJAX)](https://developers.hubspot.com/docs/methods/forms/submit_form_ajax) endpoint, which accepts CORS AJAX form submissions.
- Most GET requests for published HubDB tables. See the [HubDB API Overview](https://developers.hubspot.com/docs/methods/hubdb/hubdb_overview) for more details.

I hope this helps clarify your next steps here!

---

<div class="post-metadata">

**Author:** ![Voyager2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/voyager2/32/18373_2.png) [@Voyager2](https://community.hubspot.com/u/Voyager2)\
**Post date:** [January 17, 2020, 9:20am UTC](https://community.hubspot.com/t/cors-issue/17467/5 "2020-01-17T09:20:11Z")

</div>

@Willson ,Is there a way to resolve CORS issues for HubSpot Events HTTP API? I need to allow that for several origins. Only portalId is sent there in the URL - does not look like secret information.

Although such events are accepted by the hubspot server but I would like to avoid CORS warnings

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [January 20, 2020, 9:23am UTC](https://community.hubspot.com/t/cors-issue/17467/6 "2020-01-20T09:23:52Z")

</div>

Updated thread for conversation:

[https://community.hubspot.com/t5/APIs-Integrations/Event-HTTP-API-and-cross-origin/m-p/312938/highlight/false#M29865](https://community.hubspot.com/t5/APIs-Integrations/Event-HTTP-API-and-cross-origin/m-p/312938/highlight/false#M29865)
