Hi,

Are you accessing the same account that you were logged into when you 
generated the refresh token?  I recommend taking a look at the other 
"invalid_grant" posts on the forum, as they contain several suggestions for 
addressing this issue.  A few examples are:

   - https://groups.google.com/d/msg/adwords-api/Ib8P2ZmdyM8/PbvVt6L05RUJ
   - https://groups.google.com/d/msg/adwords-api/E1Pv7OJ5BRs/1IawP7ws5E8J
   - https://groups.google.com/d/msg/adwords-api/zHBXkEuIjZM/1E7IeLFlTbgJ
   
Thanks,
Josh, AdWords API Team

On Tuesday, January 21, 2014 11:53:16 AM UTC-5, Eldar Useinov wrote:
>
> Hi.
>
> I use Java Client library and face next problem
>
> I try to run this code 
>
>
> *new OfflineCredentials.Builder()                    
> .forApi(OfflineCredentials.Api.ADWORDS).fromFile()                    
> .build();*
>
> with ads.properties file, which containes next settings
>
>
>
>
>
>
>
>
>
>
>
>
> *api.adwords.refreshToken=1/w3eZ_***************************************api.adwords.clientId=97*********************************apps.googleusercontent.com
>  
> <http://apps.googleusercontent.com>api.adwords.clientSecret= 
> j6Ci**********************api.adwords.userAgent=AdWords API JAVA Code 
> Exampleapi.adwords.developerToken=d***********************api.adwords.isPartialFailure=falseapi.adwords.returnMoneyInMicros=trueapi.adwords.refreshOAuth2Token=true*
>
> and have next error:
>
> com.google.api.ads.common.lib.exception.OAuthException: Credential could 
> not be refreshed.
>  at 
> com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:149)
>  at adwords.GoogleAPIWrapper.<init>(GoogleAPIWrapper.java:81)
>  at adwords.Loader.<init>(Loader.java:24)
>  at 
> tasks.CampaignSyncTaskExecutor.loadCampaign(CampaignSyncTaskExecutor.java:132)
>  at 
> tasks.CampaignSyncTaskExecutor.process(CampaignSyncTaskExecutor.java:42)
>  at tasks.ATaskExecutor$1.run(ATaskExecutor.java:22)
>  at java.lang.Thread.run(Thread.java:744)
> Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 
> Bad Request
> {
>   "error" : "invalid_grant"
> }
>
>
> What i did wrong? Thank you.
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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
--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to