I am trying to access my own sheets from Google App Engine. I followed the following tutorial
https://developers.google.com/sheets/quickstart/java
this code works fine as long as the code does not run inside the Google App Engine. The following line of code throws an exception (your are not allowed to use sockets)
Credential credential = new AuthorizationCodeInstalledApp(
flow, new LocalServerReceiver()).authorize("user");
So as you can I see, I have problems with the authorization between my app engine and my google sheets.
Has someone a working example how I can access the Google Sheets API from App Engine or can give me an example how the OAuth2 Autorization between App Engine and any other Google Service will work?
Regards
Michael
I think Google App Engine has guides with regard to connecting to your App like
To issue an outbound HTTP request, use java.net.URLConnection. App Engine implements the methods defined in this abstract class by using the URL Fetch API.
The following snippet demonstrates how to perform a basic HTTP GET request. The application creates a new URL object, then calls the object's openStream() method to retrieve the content at that URL:
Since you received an error with regard to sockets, App Engine has a guide for that too:
Overview of Sockets API for Java