Hi Alexey,

>From your mail, it looks like the token is valid only for 2 scopes 

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

To use AdWords API, you should also include 
https://www.googleapis.com/auth/adwords
as a scope. See 
https://developers.google.com/adwords/api/docs/guides/authentication for 
details.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Monday, November 3, 2014 2:44:02 AM UTC-5, Alexey Chapurin wrote:
>
> Hello, 
>
> I use a new token and I receive this error message at any token, expire or 
> new. In it all essence of a question. The token correct, it is confirmed by 
> https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=MY_TOKEN .
>
> пятница, 31 октября 2014 г., 16:15:23 UTC+2 пользователь Michael Cloonan 
> (AdWords API Team) написал:
>>
>> Hello,
>>
>> For reference, the access token in the Authorization HTTP header allows 
>> API access to your account, and should be kept private. Luckily, they 
>> expire after only an hour, so exposing this one isn't a security threat, 
>> but you should be more careful in the future.
>>
>> That is also likely the issue that is causing this error message. Since 
>> access tokens are only valid for an hour, you need to make sure that you 
>> get a new one before it expires if you want to continue making API calls.
>>
>> Regards,
>> Mike, AdWords API Team
>>
>> On Friday, October 31, 2014 3:58:38 AM UTC-4, Alexey Chapurin wrote:
>>>
>>> Help to deal with a error AuthenticationError.OAUTH_TOKEN_INVALID
>>> I do inquiry by an example 
>>> https://developers.google.com/adwords/api/docs/guides/reporting
>>>
>>> __rdxml="<reportDefinition>
>>>       <id>1111111111</id>
>>>         <selector>
>>>           <fields>CampaignId</fields>
>>>           <fields>Id</fields>
>>>           <fields>Impressions</fields>
>>>           <fields>Clicks</fields>
>>>           <fields>Cost</fields>
>>>           <predicates>
>>>             <field>Status</field>
>>>             <operator>IN</operator>
>>>             <values>ENABLED</values>
>>>             <values>PAUSED</values>
>>>           </predicates>
>>>         </selector>
>>>         <reportName>Custom Adgroup Performance Report</reportName>
>>>         <reportType>ADGROUP_PERFORMANCE_REPORT</reportType>
>>>         <dateRangeType>LAST_7_DAYS</dateRangeType>
>>>         <downloadFormat>CSV</downloadFormat>
>>>       </reportDefinition>"
>>>
>>> with headers:
>>>
>>> Content-Length =  726
>>>
>>> Content-Type =  " application/x-www-form-urlencoded"
>>>
>>> Authorization =  "Bearer 
>>> ya29.rgB3ZcocK-pwC7ksEClk9SU3W428m_Kw3BHwE7JJyN-sAKx84FUfO8gEh5"
>>>
>>> developerToken =  "XХХХ-ХХХХХХХХХ_ХХХХХХ"
>>>
>>> clientCustomerId = "111-111-1111"
>>>
>>>
>>> token is correct that is visible from service:
>>>
>>> https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=MY_TOKEN
>>>
>>>
>>>  {
>>>
>>>  "issued_to": "
>>> 111111111111-11111aaaaaaaaaaaaaaaaaaaaaaaa095.apps.googleusercontent.com
>>> ",
>>>
>>>  "audience": "
>>> 111111111111-11111aaaaaaaaaaaaaaaaaaaaaaaa095.apps.googleusercontent.com
>>> ",
>>>
>>>  "user_id": "111111111111111111111",
>>>
>>>  "scope": "https://www.googleapis.com/auth/userinfo.email 
>>> https://www.googleapis.com/auth/userinfo.profile";,
>>>
>>>  "expires_in": 1192,
>>>
>>>  "email": "m...@email.ua",
>>>
>>>  "verified_email": true,
>>>
>>>  "access_type": "offline"
>>>
>>> }
>>>
>>>  
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/0c4375c2-547a-4b5c-87be-91e4407a1973%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to