System.out.println("Type the code you received here: ");
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String authorizationCode = in.readLine();
HttpTransport transport = new NetHttpTransport();
JsonFactory factory = new JacksonFactory();
// Exchange for an access and refresh token
GoogleAuthorizationCodeGrant authRequest = new GoogleAuthorizationCodeGrant(transport,
factory, clientId, clientSecret, authorizationCode, AUTH_REDIRECT_URI);
authRequest.useBasicAuthorization = false;