Access control error



hi i'm on a project and i get the contacts that are registered on my site which are local to submit them to my hubspot app and i have this message in my console
request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. this is the code i use
type: "POST",
url: api,
crossDomain : true,
xhrFields: {
withCredentials: true
"Access-Control-Allow-Headers":"Origin, X-Requested-With, Content-Type, Accept"
.done(function( data ) {
.fail( function(xhr, textStatus, errorThrown) {


Hi @maven,

Which endpoint are you using?

As this documentation states, most of HubSpot's APIs do not support CORS AJAX requests. The only POST method which supports AJAX is for the Forms API.

If you are using the Forms API, please share an example request URL and body which failed.


hi @Isaac_Takushi
thank you I solved it using the API forms