Bad Gateway(502)

126 views
Skip to first unread message

edforshaw

unread,
Jun 28, 2008, 9:07:47 AM6/28/08
to AdWords API Forum
I'm just getting started with the Adwords API (sandbox) but I'm
experiencing this error message - I've read it is an issue with Google
but can't help thinking I've configured something wrong. I've set up a
repeat loop but the 502 keeps being returned... Any help would be much
appreciated.

zaman

unread,
Jun 30, 2008, 2:09:34 AM6/30/08
to AdWords API Forum
Just want to see your code copy to point out error otherwise it seems
impossible to me.

Yaro...@gmail.com

unread,
Jun 30, 2008, 6:12:24 AM6/30/08
to AdWords API Forum, adwordsa...@google.com
Hello, i'm experiencing the same problem with the Sandbox domain

Apparently it's a server error.

Soap request:
---------------------

<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/
v12">***</applicationToken>
<clientEmail xmlns="https://adwords.google.com/api/adwords/v12">***</
clientEmail>
<developerToken xmlns="https://adwords.google.com/api/adwords/
v12">***</developerToken>
<email xmlns="https://adwords.google.com/api/adwords/v12">***</
email>
<password xmlns="https://adwords.google.com/api/adwords/v12">***</
password>
<useragent xmlns="https://adwords.google.com/api/adwords/v12">***</
useragent>
</soap:Header>
<soap:Body>
<getAllAdWordsCampaigns xmlns="https://adwords.google.com/api/
adwords/v12">
<dummy>0</dummy>
</getAllAdWordsCampaigns>
</soap:Body>
</soap:Envelope>

Soap response:
-----------------------

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
<style><!--
body {font-family: arial,sans-serif}
div.nav {margin-top: 1ex}
div.nav A {font-size: 10pt; font-family: arial,sans-serif}
span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight:
bold}
div.nav A,span.big {font-size: 12pt; color: #0000cc}
div.nav A {font-size: 10pt; color: black}
A.l:link {color: #6f6f6f}
A.u:link {color: green}
//--></style>
<script><!--
var rc=502;
//-->
</script>
</head>
<body text=#000000 bgcolor=#ffffff>
<table border=0 cellpadding=2 cellspacing=0 width=100%><tr><td
rowspan=3 width=1% nowrap>
<b><font face=times color=#0039b6 size=10>G</font><font face=times
color=#c41200 size=10>o</font><font face=times color=#f3c518
size=10>o</font><font face=times color=#0039b6 size=10>g</font><font
face=times color=#30a72f size=10>l</font><font face=times
color=#c41200 size=10>e</font>&nbsp;&nbsp;</b>
<td>&nbsp;</td></tr>
<tr><td bgcolor=#3366cc><font face=arial,sans-serif
color=#ffffff><b>Error</b></td></tr>
<tr><td>&nbsp;</td></tr></table>
<blockquote>
<H1>Server Error</H1>
The server encountered a temporary error and could not complete your
request.<p>Please try again in 30 seconds.

<p>
</blockquote>
<table width=100% cellpadding=0 cellspacing=0><tr><td
bgcolor=#3366cc><img alt="" width=1 height=4></td></tr></table>
</body></html>

zaman

unread,
Jun 30, 2008, 8:35:55 AM6/30/08
to AdWords API Forum
use nusoap.php to get campaigns

include nusoap.php into your file and then write the code below

$email = 'xxxxgmail account loginxxxxxx';
$password = 'xxxxxxxxxx';
$client_email = 'client_1+xxxxgmail account loginxxxxxx';
$useragent = 'dfgfdsdsdssd:fdsdsdghjg';
$developer_token = 'xxxxxxxxxxx++GBP';
$application_token = 'xxxxxxxxxxxx';
# Define SOAP headers.
$headers =
'<email>' . $email . '</email>'.
'<password>' . $password . '</password>' .
'<clientEmail>' . $client_email . '</clientEmail>' .
'<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/v12';
$campaign_service =
new soapclient($namespace . '/CampaignService?wsdl', 'wsdl');
$campaign_service->setHeaders($headers);
$debug = 0;

# Get all campaigns.
$request_xml =
'<getAllAdWordsCampaigns><dummy>0</dummy></getAllAdWordsCampaigns>';
$campaigns = $campaign_service->call('getAllAdWordsCampaigns',
$request_xml);
$campaigns = $campaigns['getAllAdWordsCampaignsReturn'];

Jerryatrix

unread,
Jun 30, 2008, 9:33:57 AM6/30/08
to AdWords API Forum
Actually I have been having problems with connecting to the sandbox
too.

I use nusoap, and am getting the 502 error also. But only when I use
the sandbox. It was working fine until recently.

I wonder if a Google staffer is watching or not. This has stopped my
dev. work for a couple of days now.

Jerryatrix

AdWords API Advisor

unread,
Jun 30, 2008, 11:42:12 AM6/30/08
to AdWords API Forum
Hello All,

Apologies for any inconvenience this has caused. Our engineering team
is working on resolving this and I'll post again when that work is
complete.

Cheers,
-Jeff Posnick, AdWords API Team

edforshaw

unread,
Jun 30, 2008, 4:51:01 PM6/30/08
to AdWords API Forum
The sandbox is working again now for me - thanks very much.

AdWords API Advisor

unread,
Jun 30, 2008, 5:31:53 PM6/30/08
to AdWords API Forum
Yes, I just heard that things should be back up now. The Sandbox's
backend datastore has been reset as part of our normal periodic
maintenance, however.

Cheers,
-Jeff Posnick, AdWords API Team


Reply all
Reply to author
Forward
0 new messages