0

Can I use GoogleApiClient to connect to my own GAE Endpoints API? Perhaps by adding some kind of special scope?

I know it's probably impossible (after all, my own API isn't Google's) but I'd love to leverage the G+ log in functionality!

Thanks and sorry if this is a stupid question.

Creos
  • 2,445
  • 3
  • 27
  • 45

1 Answers1

0

Not quite sure I understand the question yet. Your endpoints library can see if a user is logged in by looking at the User parameter. The example near the end of Lesson 2 of Udacity's course integrates with G+ log-in.

dyoo
  • 11,795
  • 1
  • 34
  • 44
  • There's a Python example of using the Python version of the API client to call a custom app via Endpoints in my I/O 2013 talk: https://developers.google.com/events/io/sessions/333307296 The general answer is yes, you can build your app's API with Endpoints, then call it with the Google API client. – Dan Sanderson Sep 14 '14 at 02:03
  • Thanks Dan! Are you aware of a java example? dyoo, i'll take a look at the link you posted as well. – Creos Sep 14 '14 at 20:37
  • Dan, I speed-listened to your presentation, it's cool but I'm not sure if it's answering my question. To be specific, I meant if I can use something like this but for my own Endpoints API. final GoogleApiClient.Builder b = new GoogleApiClient.Builder(manager.activity()) .setAccountName(userAccountName) .addConnectionCallbacks(apiConnectionHandler) .addOnConnectionFailedListener(apiConnectionHandler) .addApi(Plus.API) .addScope(Plus.SCOPE_PLUS_PROFILE); – Creos Sep 14 '14 at 21:58
  • [continued] instead of using the GoogleAccountCredential directly. (just the way I don't need to use GoogleAccountCredential to say log into G+ and GDrive). Thanks. – Creos Sep 14 '14 at 22:00
  • Dyoo, thanks a lot but the presentation you supplied stops at the part I care about -- how you would do the client side. It only has details on the backend setup, which I already understand and have done. Thx – Creos Sep 14 '14 at 22:01