Google User # getUserId custom endpoints are different from Google+ Profile ID

I am writing an app for appengine using GWT and Cloud Endpoints. For cloud endpoints, I use authorization as shown here: Using Auth with Endpoints . With the area https://www.googleapis.com/auth/userinfo.email

. Since I need different roles for users, I tried to use User#getUserId

and I thought it would be the Google+ profile id. Although it is not, and it is completely different (well, it is the same length). The problem is that I cannot find out how to find this id in any other way than User#getUserId

, and therefore it is very difficult to add new users in the admin role. I also tried using different scopes, but it didn't work.

My question is why is this id different from the Google+ id and is there a way to just get the Google+ id?

These are the values ​​I'm talking about:
Id from User#getUserId

: 101329505878094971459
Id from Google+ profile: 113085797747084826112

0


source to share


1 answer


Use the Google+ API .



You cannot obtain a Google+ User ID without consent to receive your Google+ ID.

+2


source







All Articles