Ok. Now I found out that the problem occur only on localhost with
Xampp. On my debian-server everything is fine.

But I dont know why...

On 8 Jun., 21:23, domJ <[email protected]> wrote:
> ok. I ran it. Here the response:
>
> Fatal error: Uncaught exception 'AuthTokenException' with message
> 'Failed to get authToken. Reason: BadAuthentication' in D:\xampp\htdocs
> \testprojects\adwords\AdWords\src\Google\Api\Ads\Common\Util
> \AuthToken.php:88 Stack trace: #0 D:\xampp\htdocs\testprojects\adwords
> \AdWords\src\Google\Api\Ads\AdWords\Lib\AdWordsUser.php(503):
> AuthToken->GetAuthToken() #1 D:\xampp\htdocs\testprojects\adwords
> \AdWords\src\Google\Api\Ads\AdWords\Lib\AdWordsUser.php(141):
> AdWordsUser->RegenerateAuthToken() #2 D:\xampp\htdocs\testprojects
> \adwords\index.php(5): AdWordsUser->__construct() #3 {main} thrown in
> D:\xampp\htdocs\testprojects\adwords\AdWords\src\Google\Api\Ads\Common
> \Util\AuthToken.php  on line 88
>
> Reason is again the BadAuthentication.
>
> On 8 Jun., 20:43, ramonpoli <[email protected]> wrote:
>
>
>
> > yes but apparently before run that example you have to use this
> > initialization:
> > $path = dirname(__FILE__) . '/AdWords/src';
> > set_include_path(get_include_path() . PATH_SEPARATOR . $path);
> > require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
> >    $user = new AdWordsUser();
> >    // Log SOAP XML request and response.
> >   $user->LogDefaults();
> >   // Get the CampaignService.
> >    $campaignService = $user->GetCampaignService('v200909','https://
> > adwords-sandbox.google.com');
>
> > are you actually doing it before calling the getAllCAmpaigns example?
>
> > On Jun 8, 1:14 pm, kondalarao yarragunta <[email protected]>
> > wrote:
>
> > > HI,
>
> > >  I tried to run the PHP ClientLibrary(aw_api_php_lib_2.2.0) on my 
> > > localhost.
> > > I changed the
> > > auth.ini like that:
>
> > > email = "[email protected]"
> > > password = "mypassword"
> > > userAgent = "My Sandbox API Tool"
> > > applicationToken = "ignored"
> > > developerToken = "[email protected]++usd"
>
> > > ; Uncomment to make requests against a client account.
> > > clientId = 
> > > "[email protected]<client_1%2b%[email protected]>
> > > "
>
> > > I set the DEFAULT_SERVER = "https://adwords-sandbox.google.com"; in the
> > > file settings.ini
>
> > > Now when I try to run
> > > aw_api_php_lib_2.2.0/examples/v200909/GetAllCampaigns.php i got the
> > > following error:
>
> > > AuthTokenException Object ( [error:AuthTokenException:private] =>
> > > BadAuthentication [url:AuthTokenException:private] =>
> > > [captchaToken:AuthTokenException:private] =>
> > > [captchaUrl:AuthTokenException:private] => [message:protected] => Failed 
> > > to
> > > get authToken. Reason: BadAuthentication [string:Exception:private] =>
> > > [code:protected] => 0 [file:protected] =>
> > > C:\xampp\htdocs\aw_api_php_lib_2.2.0\src\Google\Api\Ads\Common\Util\AuthTok
> > >  en.php
> > > [line:protected] => 88 [trace:Exception:private] => Array ( [0] => Array (
> > > [file] =>
> > > C:\xampp\htdocs\aw_api_php_lib_2.2.0\src\Google\Api\Ads\AdWords\Lib\AdWords
> > >  User.php
> > > [line] => 503 [function] => GetAuthToken [class] => AuthToken [type] => ->
> > > [args] => Array ( ) ) [1] => Array ( [file] =>
> > > C:\xampp\htdocs\aw_api_php_lib_2.2.0\src\Google\Api\Ads\AdWords\Lib\AdWords
> > >  User.php
> > > [line] => 141 [function] => RegenerateAuthToken [class] => AdWordsUser
> > > [type] => -> [args] => Array ( ) ) [2] => Array ( [file] =>
> > > C:\xampp\htdocs\aw_api_php_lib_2.2.0\examples\v200909\GetAllCampaigns.php
> > > [line] => 46 [function] => __construct [class] => AdWordsUser [type] => ->
> > > [args] => Array ( ) ) ) [previous:Exception:private] => )
>
> > > The account-information are correct. I tried it many times. And I can
> > > use the Sandbox Account View without any auth-error.
>
> > > Thank you for any help please,
>
> > > Thanks and Regards,
> > > Y.Kondalarao.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to