0
votes

For Eg: Using google drive api i made an API call to get permission from user and generate access token and got user details using that token. In that case before getting permission from user if i logged in into multiple google accounts in my browser and i tried through particular mail Id through my app. I need to display only that mail id for permission , Not to display all the logged in mail ids. How to filter for particular mail id through api call.

My sample api call:

https://accounts.google.com/o/oauth2/auth?client_id=CLIENT_ID +&redirect_uri=REDIRECT_URI &scope=email+profile+https://www.googleapis.com/auth/drive&response_type=code&access_type=offline

I just removed prompt=select_account keyword from this api call. but it still display all accounts. How to filter for particular mail id?

1

1 Answers

3
votes

You add the login_hint parameter with an account value to the authentication request.