Hi,

Could you generate a new *access token* from your *refresh token*, and 
append the *access token* to the end of the following URL?

https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=

This will take you to a page that displays the state of the access token 
and its scope. Could you confirm that the scope displayed matches the 
expected scope documented here 
<https://developers.google.com/adwords/api/docs/guides/authentication#scope>
?

Thanks,
Josh, AdWords API Team

On Thursday, April 23, 2015 at 12:40:33 PM UTC-4, fmvs...@gmail.com wrote:
>
> $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/2a66d82d-200c-4580-a222-7c0f9d8eafd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to