Question

I'm fairly certain this is possible, but I'm having trouble finding where to start. My goal is to have a web application hosted somewhere (not important) that uses Google sign in for the user accounts. So far, so good.

What I'm not sure about is interaction between an Android app and my web application. Will using a Google account from my Android app provide a key I can pass back to the api to identify what user is making the call? I need to make sure a user can only see their information, so I want to only allow my api to respond for whatever authenticated user is making the call.

I know this is likely a common task, but I haven't been able to turn up anything discussing the Android/Api authentication connection.

Thanks

Was it helpful?

Solution

Use the google developer console

From the services pane, enable the Identity Toolkit API, once activated, the console will give you the choice between a bunch of keys to choose from, select the one that was generated specifically for Android.

If your application is a game, consider using some the google play games apis instead. Those will be able to authenticate your users just as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top