Hi, Have you tried this multiple times? I ask because one possibility is that when you copied the authorization code from the browser, it's possible that you didn't copy the complete code.
Another suggestion would be to try getting another refresh token for a different account to see if it works for that account. Thanks, Josh, AdWords API Team On Friday, March 27, 2015 at 2:51:13 PM UTC-4, Sean Gottschalk wrote: > > Hello, > > I'm trying to create a refresh token for a client using my adwords > developer credentials but when I enter the generated code I get a 400 > invalid grant error from the adwords API. > > I logged into my developer console on my MCC account and verified that I > have the following OAuth credentials: > > Client ID > 379545466128.apps.googleusercontent.com > Client secret > <secret> > Redirect URIs > > urn:ietf:wg:oauth:2.0:oob > http://localhost > > I am using this example to generate the token, and have successfully > generated tokens for other client accounts in the past: > > https://github.com/googleads/googleads-java-lib/blob/master/examples/dfp_axis/src/main/java/dfp/axis/auth/GetRefreshToken.java > > This is the url that I have the clients visit to generate the token: > > https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=379545466128.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://adwords.google.com/api/adwords > > I'm not sure where to go from here, does anyone have any debugging tips? > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/b79931b2-428c-44f1-9294-d182dd1ad703%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.