Re: Trying to access Google Adwords Sandbox API

2011-09-19 Thread Kevin Winter
Hi,
  According to the jquery documentation, when you use GET as the method 
type, it appends the data to the URL and specifies a callback (
http://api.jquery.com/jQuery.ajax/).  The AdWords API unfortunately does not 
support jsonp requests, so this will not work.

I'd suggest taking a look at the javascript client library: 
http://code.google.com/p/google-api-adwords-js/wiki/Readme

The README (linked above) discusses various options for http transport that 
work within the constraints of cross-site security.

- Kevin Winter
AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en


Trying to access Google Adwords Sandbox API

2011-09-15 Thread adnonymous
I'm trying to access Google Adwords Sandbox API and I cannot, for the
life of me, figure out what's going on.

Here's my code:

var wsUrl = "https://adwords-sandbox.google.com/api/
adwords/cm/v201008/CampaignService";

var soapRequest =
'http://schemax.xmlsoap.org/soap/
envelope/" \
xmlns="https://adwords.google.com/api/adwords/cm/
v200906"> \
 \
adwords \
***@gmail.com \
*** \
***@gmail.com++USD \
MyApplication \
 \
 \
 \
 \
';

$.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 );
}


I keep getting 500 Internal Server errors. What am I doing wrong?! On
the Google Adwords Sandbox website, they list simple instructions:

> 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.
http://code.google.com/apis/adwords/docs/sandbox.html

Help!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en