AnsweredAssumed Answered

I'm trying to tap the API - no dice

Question asked by fdd2eb18536457a5a8ecdfcce9da740de7c01ddc on Apr 5, 2016
Latest reply on Apr 5, 2016 by Sanford Whiteman

I'm trying to call the Marketo API and I'm getting this error: net::ERR_NAME_NOT_RESOLVED

 

this is the function I'm using

 

       var marketoAPIcallURL = 'https://182-EMG-811.mktorest.com/rest/v1/';

        var apiToCall = 'lead/182.json';

        var accessToken = '?access_token=8a385a92-4a87-4e89-9eda-xxxxxxxxxxxx:ab';

        //

        console.log(marketoAPIcallURL);

        marketoAPIcallURL += apiToCall;

        console.log(marketoAPIcallURL);

        marketoAPIcallURL += accessToken;

        console.log(marketoAPIcallURL);

        //

      function callMarketoV3() {

 

 

            console.log('API CALL HAS BEGUN');

            console.log(marketoAPIcallURL);

            $.ajax({

                url: marketoAPIcallURL,

                type: "POST",

                contentType: "application/json; charset=utf-8",

                dataType: "json",

                success: function (data) {

                    console.log(data);

                }

            });

        }

 

Does anyone have an idea what the problem is?

Outcomes