Hi Vince,

The v13 PHP code examples are no longer available, but there are a
couple of ways to initialize the sandbox:

1. Make a call to any API method in v201008 of AdWords API.
CampaignService.get is the method of choice.
2. Make a call to v13 AccountService.getClientAccounts. The Soap logs
look like follows:

POST /api/adwords/v13/AccountService
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: sandbox.google.com
Content-Length: 797
Connection: Keep-Alive
TimeStamp: Thu, 18 Nov 2010 15:02:08 GMT

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/
XMLSchema"><soap:Header><applicationToken xmlns="https://
adwords.google.com/api/adwords/v13" /><developerToken xmlns="https://
adwords.google.com/api/adwords/v13">******</developerToken><email
xmlns="https://adwords.google.com/api/adwords/v13";>******</
email><password xmlns="https://adwords.google.com/api/adwords/
v13">******</password><useragent xmlns="https://adwords.google.com/api/
adwords/v13">******</useragent></
soap:Header><soap:Body><getClientAccounts xmlns="https://
adwords.google.com/api/adwords/v13" /></soap:Body></soap:Envelope>

You might also want to take a look at the AdWords API PHP client
library at http://code.google.com/p/google-api-adwords-php/. It has
lots of code examples for various versions of AdWords API, and covers
the most common tasks that you can accomplish using the API.

Hope this helps. Let me know if you have more questions, and I can
answer them for you.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Nov 18, 7:29 am, vinceadwords <[email protected]>
wrote:
> I updated my code:
>
> <?php
> $data =
> '<?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns="https://adwords.google.com/api/adwords/cm/v201008";>
> <soap:Header>
> <email>MY EMAIL</email>
> <password>MY PASSWORD</password>
> <developerToken>MY TOKEN</developerToken>
> <useragent>MY APP</useragent>
> </soap:Header>
> <soap:Body>
> <getClientAccounts/>
> </soap:Body>
> </soap:Envelope>';
>
> #OPEN CURL SESSION
> $curl_session =
> curl_init("https://adwords.google.com/api/adwords/v13/AccountService?wsdl";);
>
> curl_setopt($curl_session, CURLOPT_HTTPHEADER, array("Content-Type:
> application/soap+xml"));
> curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($curl_session, CURLOPT_HEADER, false);
> curl_setopt($curl_session, CURLOPT_POST, true);
> curl_setopt($curl_session, CURLOPT_POSTFIELDS, $data);
>
> #INITIALIZE ADWORDS API CONTENTS
> $adwords_api_contents = curl_exec($curl_session);
>
> #CLOSE CURL SESSION
> curl_close($curl_session);
>
> echo $adwords_api_contents;
> ?>
>
> Still no luck getting this to work. Any idea anyone?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to