title: Sending a GET request using SOAP and Javascript (Google Adwords Sandbox API)
body: <p>I'm trying to access Google Adwords Sandbox API and I cannot, for the life of me, figure out what's going on.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>        var wsUrl = "https://adwords-sandbox.google.com/api/adwords/cm/v201008/CampaignService";
  
          var soapRequest =
                  '&lt;soapenv:Envelope \
                  xmlns:soapenv="http://schemax.xmlsoap.org/soap/envelope/" \
                  xmlns="https://adwords.google.com/api/adwords/cm/v200906"&gt; \
                  &lt;soapenv:Header&gt; \
                  &lt;service&gt;adwords&lt;/service&gt; \
                  &lt;email&gt;***@gmail.com&lt;/email&gt; \
                  &lt;password&gt;***&lt;/password&gt; \
                  &lt;developerToken&gt;***@gmail.com++USD&lt;/developerToken&gt; \
                  &lt;useragent&gt;MyApplication&lt;/useragent&gt; \
                  &lt;/soapenv:Header&gt; \
                  &lt;soapenv:Body&gt; \
                      &lt;getClientAccounts/&gt; \
                  &lt;/soapenv:Body&gt; \
                  &lt;/soapenv:Envelope&gt;';
  
          $.ajax({
              type: "GET",
              url: wsUrl,
              contentType: document.body,
              crossDomain: true,
              dataType: "jsonp",
              data: soapRequest,
              success: processSuccess,
              error: processError
          });
  
      });
  
      function processSuccess(data, status, req) {
          if (status == "success")
              console.log("success");
      }
  
      function processError(data, status, req) {
          console.log("status = " + status + " data= " + data );
      }
  </code></pre>
  
  <p>I keep getting 500 Internal Server errors. What am I doing wrong?! On the Google Adwords Sandbox website, they list simple instructions:</p>
  
  <blockquote>
    <p>To create a sandbox account, send a get request to the sandbox version
    of CampaignService, using the WSDL location and sandbox headers as
    described below. This initial call to the sandbox creates an MCC
    sandbox account, along with five client accounts, for the email
    address you specified. Your sandbox account and its client accounts
    start out empty.
    <a href="http://code.google.com/apis/adwords/docs/sandbox.html" rel="nofollow">http://code.google.com/apis/adwords/docs/sandbox.html</a></p>
  </blockquote>
  
  <p>Help!</p>