$user = *new *AdWordsUser();

$OAuth2Handler = $user->GetOAuth2Handler();

$user->SetOAuth2Info(

    $OAuth2Handler->GetAccessToken(

        $user->GetOAuth2Info(), $code, $redirectUri));

$oauth2Info = $user->GetOAuth2Info();


Debugger::*dump*($oauth2Info);

$customerService = $user->GetService('CustomerService');

$customer = $customerService->get();

It is part of a code. As you see in the beginning information for 
authorization is requested at the beginning and behind that directly there 
is a request. Thus correct access_token and refresh_token values return. 
And when a request of get is sent application returns OAUTH_TOKEN_INVALID 
error. If there was an error in auth.ini that the method 
OAuth2Handler->GetAccessToken () would return incorrect information.

четверг, 23 апреля 2015 г., 17:34:50 UTC+5 пользователь Josh Radcliff 
(AdWords API Team) написал:
>
> Hi,
>
> It sounds like you may not have configured your *auth.ini* file 
> correctly. Please go through the steps listed in the Getting Started 
> section of the README 
> <https://github.com/googleads/googleads-php-lib#user-content-getting-started>,
>  
> and check out the library's detailed page on OAuth 
> <https://github.com/googleads/googleads-php-lib/wiki/Using-OAuth-2.0>.
>
> Thanks,
> Josh, AdWords API Team
>
> On Thursday, April 23, 2015 at 7:48:07 AM UTC-4, fmvs...@gmail.com wrote:
>>
>> I want to get CustomerID.
>> $customerService = $user->GetService('CustomerService');
>>
>> $customer = $customerService->get();
>>
>>
>> Return OAUTH_TOKEN_INVALID, but 
>> $OAuth2Handler->IsAccessTokenValid($oauth2Info)return true. Why do i see 
>> this error? 
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2b8c1c3f-ea73-48c2-bd13-9fa1578817ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to