Hi Robert, The AdWords API Sandbox environment was refreshed yesterday evening ( see http://groups.google.com/group/adwords-api/browse_thread/thread/3c8dba2551e59630/ ) which erased all existing accounts. Since you are using the v13 version of the API you must regenerate your client accounts by first running AccountService.getClientAccounts() without specifying a clientEmail.
Best, - Eric Koleda, AdWords API Team On Nov 11, 8:10 am, "[email protected]" <[email protected]> wrote: > Hi, > > Yesterday I created some campaigns and text ads using the Google API, > but when i try again today (using the exact same script) I'm getting > CLIENT_EMAIL_INVALID. Does anyone know why this is? > > I used the PHP code examples provided by Google and the code looks > like this: > > require_once('AuthToken.php'); > require_once('SoapClientFactory.php'); > > $email = '[email protected]'; > $password = 'xxxxxx'; > $client_email = '[email protected]'; > $user_agent = 'Adwire'; > $developer_token = '[email protected]++usd'; > $application_token = 'xxxxxxxxxxxxxxxxxxxxxx'; > $account_type = 'GOOGLE'; > $service = 'adwords'; > > $namespace = 'https://adwords.google.com/api/adwords/cm/v200906'; > > # Define SOAP headers. > $auth = new AuthToken($email, $password, $account_type, $service); > $headers = > '<RequestHeader xmlns="' . $namespace . '">' . > '<email>' . $email . '</email>' . > '<password>' . $password . '</password>' . > '<userAgent>' . $user_agent . '</userAgent>' . > '<developerToken>' . $developer_token . '</developerToken>' . > '<authToken>' . $auth->get_auth_token() . '</authToken>' . > '<clientEmail>' . $client_email . '</clientEmail>' . > //'<applicationToken>' . $application_token . '</ > applicationToken>' . > '</RequestHeader>'; > > $campaign_service = SoapClientFactory::GetClient( > 'https://adwords-sandbox.google.com/api/adwords/cm/v200906'. > '/CampaignService?wsdl', 'wsdl'); > $campaign_service->setHeaders($headers); > $campaign_service->soap_defencoding = 'UTF-8'; > $debug = 0; > > # Create new campaign structure. > $campaign_xml = > '<endDate>20101001</endDate>' . > '<name>Test Campaign - ' . time() . '</name>' . > '<status>PAUSED</status>' . > '<biddingStrategy xsi:type="ManualCPC"/>' . > '<budget>' . > '<period>DAILY</period>' . > '<amount>' . > '<currencyCode>USD</currencyCode>' . > '<microAmount>1000000</microAmount>' . > '</amount>' . > '<deliveryMethod>STANDARD</deliveryMethod>' . > '</budget>'; > > $request_xml = > '<mutate xmlns="' . $namespace . '">' . > '<operations>' . > '<operator>ADD</operator>' . > '<operand>' . $campaign_xml . '</operand>' . > '</operations>' . > '</mutate>'; > > # Add campaign. > $campaigns = $campaign_service->call('mutate', $request_xml); > $campaigns = $campaigns['rval']['value']; > if ($debug) { > show_xml($campaign_service);} > > if ($campaign_service->fault) { > show_fault($campaign_service); > exit(1); > > } > > Thanks in advance! -- 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=.
