Hello Vincent,
You are trying to use your login and password with the OAuth2 authorization method. While it is possible to use these credentials (with ClientLogin method), it is already deprecated and will be removed in the future. Please check out these documents for more details on OAuth2: https://developers.google.com/adwords/api/docs/authentication https://code.google.com/p/google-api-adwords-php/wiki/OAuth2 -Danial, AdWords API Team. On Tuesday, July 16, 2013 2:53:27 PM UTC+4, Vincent Vandegans wrote: > > Hi, > > i set up a PHP script to connect to Adwords API. > I get a "invalid_client" error, although i checked my credentials and they > looked valid. > > Fatal error: Uncaught exception 'OAuth2Exception' with message '{ "error" > : "invalid_client" }' in > /var/www/adwordsapi/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php:115 > > Stack trace: #0 > /var/www/adwordsapi/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php(92): > > SimpleOAuth2Handler->MakeRequest('https://account...', Array) #1 > /var/www/adwordsapi/src/Google/Api/Ads/Common/Util/OAuth2Handler.php(112): > SimpleOAuth2Handler->RefreshAccessToken(Array) #2 > /var/www/adwordsapi/src/Google/Api/Ads/AdWords/Lib/AdWordsSoapClient.php(71): > OAuth2Handler->GetOrRefreshAccessToken(Array) #3 [internal function]: > AdWordsSoapClient->__doRequest('__soapCall('get', Array, NULL, Array, > Array) #5 > /var/www/adwordsapi/src/Google/Api/Ads/AdWords/v201209/TargetingIdeaService.php(8261): > > AdsSoapClient->__soapCall('get', Array) #6 > /var/www/adwordsapi/test.php(46): TargetingIdeaService->get(Object(Targ in > /var/www/adwordsapi/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php > on line 115 > > *adwords_username *: my adwords email adress > *adwords_password* : my password for this email adress > *adwords_developerToken* : xxxxxxxxxx-xxxx-xxxxxx > *Default server* : https://adwords.google.com/ > *ClientId* : the one on the top right of my google's adwords account. > > Version Used : v201209 (i also tried the latest one from 2013). > > Does anybody know what i'm doing wrong? > > thanks, > vincent > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
