I've gone through all of the steps listed here: https://developers.google.com/drive/v2/web/quickstart/java and now when I run my project, it gives me a 400 error, redirect url mismatch on Chrome.
I've tried following multiple instructions from here: Google OAuth 2 authorization - Error: redirect_uri_mismatch but I am having two key problems: When I go to register the URI in my developers console, I have no field to put the redirect URI's in, and my redirect URI is different every time, from what I can tell.
How can I add a redirect URI, and also whenever I run the program, the redirect URI seems to be different every time.
Taken from the console ( run 1, and run 2):
redirect_uri=http://localhost:62210/
redirect_uri=http://localhost:62349/
So I have no idea how to account for dynamic redirect URI's.
My code matches the quickstart/java link exactly
Here is the console output:
Feb 08, 2016 7:42:38 PM com.google.api.client.util.store.FileDataStoreFactory setPermissionsToOwnerOnly
WARNING: unable to change permissions for everybody: C:\Users\Speedy Octopus\.credentials\drive-java-quickstart
Feb 08, 2016 7:42:38 PM com.google.api.client.util.store.FileDataStoreFactory setPermissionsToOwnerOnly
WARNING: unable to change permissions for owner: C:\Users\Speedy Octopus\.credentials\drive-java-quickstart
2016-02-08 19:42:38.378:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2016-02-08 19:42:38.378:INFO::jetty-6.1.26
2016-02-08 19:42:38.388:INFO::Started SocketConnector@localhost:62210
Please open the following address in your browser:
https://accounts.google.com/o/oauth2/auth?client_id=20967686237-compute@developer.gserviceaccount.com&redirect_uri=http://localhost:62210/Callback&response_type=code&scope=https://www.googleapis.com/auth/analytics.readonly
Attempting to open that address in the default browser now...