I have a Google App Engine application deployed which contains and manages user data. My users may want to share their personal data with third party sites. Think Garmin sharing running data with myfitness pal or Strava.
The google documentation is gives good examples for using endpoints with iOS, Android, and javascript based web apps. These examples use a client id but not a "client secret" and do not involve refreshing the access tokens.
I have a javascript app running on a third-party site that does one time lookups against the api well.
I’d like to create a sample server app, preferably in java, that would connect periodically using an assigned client secret and refresh access tokens.
I have found documentation for accessing Google API's at the second link below but it is not clear if "Google APIs" include Google App Engine endpoints or just the standard suite of google apis.
What is not clear to me is that at the first link the documentation suggests that a client library needs to be generated from the backend endpoint api using maven or the endpoints.sh tool. Examples are provided for iOS/Android but there is no discussion for third party access.
Does anyone know is the server access configuration I describe possible with custom endpoints? Has anyone encountered example code for a server app that uses refresh tokens against an endpoint api?
Thanks!
End Points Documentation:
https://cloud.google.com/appengine/docs/java/endpoints/auth
OAuth Documentation:
https://developers.google.com/identity/protocols/OAuth2InstalledApp
Related
I want to use jwt in android app, and need to write server code in java, are their any examples available or web services available.
I'm developing a RESTful API for my app on GAE python and right now I'm trying to figure out the best way to secure this API.
I have my own member/authentication mechanism on this app.
what is the best way to do this?
having public/private key pairs
becoming an OAuth provider
HTTP authentication (seems very weak to me)
other??
First, discard HTTP Auth. It is not recommended in a true REST API since it resides on cookies.
I would go with OAuth. There's a library called appengine_oauth_provider, which could helps you to start implementing your own provider.
You can use Google Service Account for User Authentication. However, people still can register an account and use your API and surely your app engine bill will go up. They've just introduce Google Cloud Endpoints at Google I/O 2012. You will have a Client ID which will only use on your client application(Android,iOS).
Google I/O 2012 - Building Android Applications that Use Web APIs with Yaniv Inbar and Sriram Saroop
Google I/O 2012 - Building Mobile App Engine Backends for Android, iOS and the Web
If you are interested in, you should try to sign up for trusted tester at
http://endpoints-trusted-tester.appspot.com/
We are porting our application over to GAE and one of the options it has is to render to a printer? Is this possible in GAE (being in the cloud it may not have the concept of printers). If so, how is that done? (Google search does not appear to show anything.)
thanks - dave
We have used Google Cloud Print in the office before where you can configure your printers and share them using Google Cloud Print. Here are a list of Cloud Ready Printers. There also seems to be an API for Cloud Print which I believe you can explore calling from your GAE servers using the URL Fetch service, authentication is managed using OAuth2 for which you can use the OAuth2 client libraries.
I think the first step is to check if you need to keep your existing printers and if they can be added to Google Cloud print, if this is possible then you can explore using the Cloud Print APIs from your GAE App, see the following links in the docs:
https://developers.google.com/cloud-print/docs/proxyinterfaces
https://developers.google.com/cloud-print/docs/devguide
If your printers do not support cloud print unfortunately you might have to develop and expose your own API that accepts jobs and sends them over to network printers
I have a web application hosted in Google app engine and i need to handle some APIs (calendar). I need to authenticate the user via OAuth and to call an API.
I'm going to guess you are talking about the Google Calendar API, since you didn't specify. Information about using the Google Calendar API (in Java) is here. The document isn't specifically tailored to App Engine, but you can see some App Engine examples in the client library distribution.
You can try scribe-java. It works on GAE. Or maybe scribe-up which is an extension to it and supports getting user profiles out of the box.
What is the best way to access Google Documents (documents, spreasheets etc from Google Apps or Gmail) using Java on Google App Engine. We are using GWT on the client side.
Thanks,
Carl
The Google Data Client for Java suppose to work on the Google App Engine.
It gives you access to must of Google Apps Services.
Google has Google Client API which probably has a better support for OAuth2, json and support for the API discovery, but still The old API should work.
Read about Migrating To Google Api Java Client this should resolve any confusion you might have.