APIs & Integrations

dannymurong
Participante | Parceiro Diamante
Participante | Parceiro Diamante

CORS issue

resolver
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?
0 Avaliação positiva
1 Solução aceita
Willson
Solução
HubSpot Employee
HubSpot Employee

CORS issue

resolver

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:

I hope this helps clarify your next steps here! 

Product Manager @ HubSpot

Exibir solução no post original

5 Respostas 5
sharonlicari
Gerente da Comunidade
Gerente da Comunidade

CORS issue

resolver

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


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Avaliação positiva
dannymurong
Participante | Parceiro Diamante
Participante | Parceiro Diamante

CORS issue

resolver

hey @sharonlicari ,

 

Yes I will still need assistance on this matter.

 

Appreciate your advice.

 

Thanks,

Danny

0 Avaliação positiva
Willson
Solução
HubSpot Employee
HubSpot Employee

CORS issue

resolver

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:

I hope this helps clarify your next steps here! 

Product Manager @ HubSpot
Voyager2
Membro

CORS issue

resolver

@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

0 Avaliação positiva
Willson
HubSpot Employee
HubSpot Employee

CORS issue

resolver
0 Avaliação positiva