How to tell user is using google account or G suite for Education account?

37 views
Skip to first unread message

Xin Ming

unread,
Sep 11, 2018, 12:12:56 PM9/11/18
to google-api-java-client
I am using Google OAuth2.0, the requirement is only let G suite for Education account login, so I want to know what type of account user is using.

The login part is finished, I get access token and refresh token, I asked for two scopes https://www.googleapis.com/auth/userinfo.profile , https://www.googleapis.com/auth/userinfo.email

I checked the user profile, can't find any information. 

Can I differentiate these two type of account by only require above two scopes? if not, what other scopes I need to require and what API I need to use? 

One example I found online, https://www.brainpop.com/
when I log in using my personal Google account, 
the website only asks for Basic account info such as View your basic profile info and View your email address, 
and then the login will be denied and tell me it's not G-suite education account.

Appreciate anyone's help.

If I post this topic in the wrong place, kindly let me know, thanks.
Reply all
Reply to author
Forward
0 new messages