Hello Larisa,
It looks like you collect OAuth2 credentials (access token) but send it as clientLogin header. The OAuth2 credentials needs to be sent in the HTTP header instead of SOAP header. Please see the "Signing API request" section in the documentation: https://developers.google.com/adwords/api/docs/guides/authentication or consider using our PHP client library: https://developers.google.com/adwords/api/docs/clientlibraries -Danial, AdWords API Team. On Wednesday, December 4, 2013 8:13:49 PM UTC+4, larisa bolgova wrote: > > Hi. I wanna get user account customerId to get all his campaings, etc. > > i try to do so in this way > > *$client = new Google_Client();* > *$client->setApplicationName('name');* > *$client->setClientId('application id');* > *$client->setClientSecret('AppGoogleOAuthClientSecret');* > *$client->setRedirectUri('AppGoogleOAuthRedirectURI));* > *$client->setDeveloperKey('AppGoogleOAuthDeveloper token));* > *$client->setScopes('https://adwords.google.com/api/adwords/' > <https://adwords.google.com/api/adwords/'>);* > *$client->authenticate();* > > than i make next adwords call > > *$arrResponse = Zend_Json::decode($client->getAccessToken());* > *$authToken = $arrResponse['access_token'];* > *$wsdl = > 'https://adwords.google.com/api/adwords/mcm/v201309/CustomerService?wsdl > <https://adwords.google.com/api/adwords/mcm/v201309/CustomerService?wsdl>';* > *$namespace = 'https://adwords.google.com/api/adwords/mcm/v201309 > <https://adwords.google.com/api/adwords/mcm/v201309>';* > *$options = array('features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'encoding' => > 'utf-8');* > *$customerService = new SoapClient($wsdl, $options);* > *$headers = new SoapHeader($namespace, 'RequestHeader', array('authToken' > => $authToken, 'userAgent' => 'Name',* > > *'developerToken' => 'Developer token'**,* > > *'clientCustomerId' => 'AppGoogleOAuthClientID');* > *$customerService->__setSoapHeaders($headers);* > *$result = $customerService->get();* > > after that i've got the next error > AuthenticationError.GOOGLE_ACCOUNT_COOKIE_INVALID > > Where is my mistake. Pls help. > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.