Hi there
My sandbox account was cleared recently but since then no new client
accounts have been created for me.
No matter what I do I get nothing.
I am able to retrieve my client accounts and do everything normally
with the same code in the production environment , but not in the
sandbox.
This is the code I am using to test it, but I do not think there is a
problem with it, it is straight from the samples section. My actual
code uses APIlity and the same problem exists there too. I think it is
not really an APIlity problem, which is why I am now posting here.
I think there is a problem with the sandbox, but I might be doing
something dopey. Please help me.
=====================================-
require_once('lib/nusoap.php');
# Provide AdWords login information.
$email = '
xxx...@gmail.com';
$password = 'bigpassword';
$useragent = 'MS DFDFD: AdWords API PHP Sample Code';
$developer_token = 'booglesandworrfle';
$application_token = 'renandstimpy';
# Define SOAP headers.
$headers =
'<email>' . $email . '</email>'.
'<password>' . $password . '</password>' .
'<useragent>' . $useragent . '</useragent>' .
'<developerToken>' . $developer_token . '</developerToken>' .
'<applicationToken>' . $application_token . '</applicationToken>';
# Define SOAP headers.
$headers =
'<email>' . $email . '</email>'.
'<password>' . $password . '</password>' .
'<useragent>' . $useragent . '</useragent>' .
'<developerToken>' . $developer_token . '</developerToken>' .
'<applicationToken>' . $application_token . '</applicationToken>';
# Set up service connection. To view XML request/response, change
value of
# $debug to 1. To send requests to production environment, replace
# "
sandbox.google.com" with "
adwords.google.com".
#$namespace = '
https://sandbox.google.com/api/adwords/v11';
$namespace = '
https://adwords.google.com/api/adwords/v11';
$account_service =
new soapclientNusoap($namespace . '/AccountService?wsdl', 'wsdl');
$account_service->setHeaders($headers);
$debug = 0;
# Get client accounts.
$login_emails = $account_service->call('getClientAccounts');
$login_emails = $login_emails['getClientAccountsReturn'];
if ($debug) show_xml($account_service);
if ($account_service->fault) show_fault($account_service);
# Display login emails.
for ($i = 0; $i < count($login_emails); $i++) {
echo 'Login email is "' . $login_emails[$i] . '".' . "\n";
}
=====================================