Hi,

The issue is that the scope of the access token is incorrect:

"Scope": "https://www.googleapis.com/auth/userinfo.email 
https://www.googleapis.com/auth/userinfo.profile";

Please use the scope specified in our OAuth guide 
<https://developers.google.com/adwords/api/docs/guides/authentication#scope>
: https://www.googleapis.com/auth/adwords

Cheers,
Josh, AdWords API Team

On Wednesday, March 4, 2015 at 3:13:08 AM UTC-5, sneus...@treto.ru wrote:
>
> access_token я получаю из refresh_token
> Проверил свой access_token таким образом:
>
>
> https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=YOUR_ACCESS_TOKEN
>
> В ответ получил:
>
> {
>  "issued_to": 
> "ххххххххххххххххххххххххххххххххххххххххххххххх.apps.googleusercontent.com 
> <http://xn--u1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.apps.googleusercontent.com>",
>  "audience": 
> "ххххххххххххххххххххххххххххххххххххххххххххххх.apps.googleusercontent.com",
>
>  "user_id": "хххххххххххххххххххххххх",
>  "scope": "https://www.googleapis.com/auth/userinfo.email 
> https://www.googleapis.com/auth/userinfo.profile";,
>  "expires_in": 3587,
>  "email": "sneustr...@treto.ru",
>  "verified_email": true,
>  "access_type": "offline"
> }
>
>
> У меня идет получение access_token  без проблем, а вот віполнение запроса 
> к любму сервису с использованием полученного access_token сопровождается 
> ошибкой: [AuthenticationError.OAUTH_TOKEN_INVALID @ ; trigger:'<null>']
>
> среда, 4 марта 2015 г., 0:17:35 UTC+2 пользователь Josh Radcliff (AdWords 
> API Team) написал:
>>
>> Hi,
>>
>> Sorry, I can only answer in English. That error indicates that the 
>> *Authorization* header 
>> <https://developers.google.com/adwords/api/docs/guides/soap#http-headers> in 
>> your request does not contain a valid OAuth token. Please read through that 
>> link and make sure that you are formatting the header as specified.
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Tuesday, March 3, 2015 at 2:00:13 PM UTC-5, sneus...@treto.ru wrote:
>>>
>>> Доброго времени суток!
>>> Работаю с прямыми запросами к сервисам. Использовать клиентские 
>>> библиотеки нет возможности.
>>>  У меня все работает для тестового аккаунта: я получил refresh_token и 
>>> генерирую из него access_token. Далее отправляю запрос к любому сервису 
>>> AdWords, получаю ответы.
>>> Теперь у меня задача все это делать на рабочем аккаунте. Делаю все 
>>> тоже:получил refresh_token и генерирую из него access_token, но вот при 
>>> отправке запросов к любому сервису получаю ошибку:  OAUTH_TOKEN_INVALID.
>>>
>>> В чем может быть проблема, уже все перерыл. Подскажите пожалуйста. 
>>> Спасибо!
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/8b698116-9f9c-4752-b59c-2760978690d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to