"Uncaught SyntaxError: Unexpected token:" and "Access-Control-Allow-Origin"

0

Personally I'm trying to do a MailChimp integration, but I'm having problems with this error:

1 - Access-Control-Allow-Origin 2 - Uncaught SyntaxError: Unexpected token:

I can not find the problem. Can you help me?

For the "Access-Control-Allow-Origin" error

formData = {
            u: "d6bd0bfa42c51cbaec3eb879b",
            id: "e943abd300"
        };

        $.ajax({
            url:"http://academiadopsicologo.us12.list-manage.com/subscribe/post",
            type:'GET',
            crossDomain:true,
            data:formData,
            dataType:'json',
            contentType:'application/json',

            success: function(data) {
                console.log(data);
            },

            error: function(data) {
                console.log(data);
            }

        });

For Uncaught SyntaxError: Unexpected token:

formData = {
    u: "d6bd0bfa42c51cbaec3eb879b",
    id: "e943abd300"
};

$.ajax({
    url:"http://academiadopsicologo.us12.list-manage.com/subscribe/post",
    type:'GET',
    crossDomain:true,
    data:formData,
    dataType:'jsonp',
    jsonpCallback: 'callback',
    contentType:'application/json',

    success: function(data) {
        console.log(data);
    },

    error: function(data) {
        console.log(data);
    }

});

* Even if you change the subscribe / post to subscribe / post-json, nothing changes.

Who can help me, thank you. I can not locate the problem.

    
asked by anonymous 11.09.2017 / 21:02

0 answers