Ok, I went to: https://code.google.com/apis/console/b/0/?noredirect#project:294392641373:access
and created a new Client ID for installed applications. I pasted the new clientId and clientSecret into the appropriate tags (api.adwords.clientID and api.adwords.clientSecret) in my ads.properties file. I then ran GetRefreshToken.java, pasted the auathorizeUrl into a browser, and received the authorizationCode string. I then set the authorizationCode = the authorizationString string in GetRefreshToken, recompiled, and reran GetRefreshToken. So, the GetRefreshToken code snippet looks like" String authorizeUrl = authorizationFlow.newAuthorizationUrl().setRedirectUri(CALLBACK_URL).build(); System.out.println("Paste this url in your browser: \n" + authorizeUrl + '\n'); // Wait for the authorization code. System.out.println("Type the code you received here: "); //String authorizationCode = new BufferedReader(new InputStreamReader(System.in)).readLine(); String authorizationCode = "4/16m3ojziyJynU1rk-vT4CvWSIxVv.shLjRoYgb94XMqTmHjyTFGMkdPq5iQI"; // Authorize the OAuth2 token. GoogleAuthorizationCodeTokenRequest tokenRequest = authorizationFlow.newTokenRequest(authorizationCode); tokenRequest.setRedirectUri(CALLBACK_URL); GoogleTokenResponse tokenResponse = tokenRequest.execute(); Now, when I run GetRefreshToken.java, I see: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant", "error_description" : "Invalid code." } Please advise. Thanks. On Wednesday, March 19, 2014 1:04:46 PM UTC-7, steve....@revvim.com wrote: > I have a api.adwords.clientId and a api.adwords.clientSecret obtained from: > > > https://console.developers.google.com/project/apps~astute-being-524/apiui/credential > > I have pasted the clientId and clientSecret into the appropriate spots in > ads.properties file. > > I have run GetRefreshToken.java and at line 78, am displayed a url to > past in a browser. > > I paste the url in a browers and see: > > Error: redirect_uri_mismatch > > Please let me know what I need to do to correct the situation. I really > need to get this migration complete before the Sunset date. > > Thanks. > > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. For more options, visit https://groups.google.com/d/optout.