String redirectURI= "https://oauth2-login-demo.appspot.com/code"; urlBuilder.queryParam("redirect_uri", URLEncoder.encode(redirectURI,"UTF-8" ));