Hello, I’m Trying to Add a contact using the API.
I can only do it in javascript because I don’t have server side access.
SO I put that:
$.ajax({
method: 'POST',
url: "https://bagatelles-lingeriecom.api-us1.com/admin/api.php",
crossDomain: true,
data: {
'api_action': 'contact_sync',
'api_key': '_key',
'email': $('#compte_email').val(),
'field[%CIVILIT%,0]': $('#compte_civilite').val(),
'first_name': $('#compte_prenom').val(),
'last_name': $('#compte_nom').val(),
'p[1]': 1,
'status[1]': 1,
'sdate[1]': _date
}
}
);
but when submitting, I get a No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Error (I use Chrome)
What’s wrong with my request?
Best regards.