5 Replies Latest reply on Apr 5, 2016 1:29 PM by Sanford Whiteman

    I'm trying to tap the API - no dice

      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?