Search code examples
google-apigoogle-plusgoogle-oauth

Google+ API scope for education


On my website I want to give my users the option to log in using Google OAuth2. Because my webapp needs to know which educational institution my user is visiting, I want to fill that in for them using their google+ profile. The https://www.googleapis.com/auth/plus.me scope gives my a lot of information but not educational details (or I could't found it using this scope). Facebook GRAPH uses the user_education_history, which works fine when using the facebook login flow. Does anybody know if this is possible and how with google+?


Solution

  • It all depends on what information the User has made public on their profile, because only public information can be retrieved via the API at the moment.

    In the result of the people.get method educational information will be included in the organizations array, recognizable with "type": "school" (as opposed to "type": "work" entries in the same array).

    Take a look at this example of my own profile:

    "organizations": [
      {
       "name": "TU Wien",
       "title": "Computer Science",
       "type": "school",
       "startDate": "1998",
       "endDate": "2004",
       "primary": false
      },
      ...
    ]