Forms API CORS problem


#1

Hello,

is there a way how to set up on HubSpot portal my domain and allow for it CORS requests?
According to this faq question https://developers.hubspot.com/docs/faq/do-hubspot-apis-support-ajax-request it is not posssible in order not to expose any authentication.
But form submit https://developers.hubspot.com/docs/methods/forms/submit_form does not require any authentication, therefore there is nothing to expose - there are just portal_id and form_guid, which are both publicly available even with regular embedding.
How can I overcome this without creating my own backend server to do 1 simple request that doesn’t require any auth.?

Thank you


#2

Hi @Michal_w4,

It’s not currently possible to make a CORS AJAX request to and HubSpot API, even the forms API. This is a use case the team is hoping to reevaluate in the future. If you have the inclination, I would encourage you to check out the Ideas Forum on the HubSpot Community. There, you can create a post including your use case that product and other customers can see.