i have created an oauth2 workflow that correctly logs me in.
my scopes are:
when i go through the authorization process, it lists "View and manage your Google Groups" which i would assume means i can get a list of the google groups i am a part of. however, i cannot figure out where to send a request to get this info.
sending a GET request to the /admin/directory/v1/groups?userKey=userkey
endpoint returns a 403 insufficient scope
.
but if i add to the scopes:
- https://www.googleapis.com/auth/admin.directory.group.readonly
- https://www.googleapis.com/auth/admin.directory.group.member.readonly
and then hit the same endpoint, i receive a 403 not authorized
because i am not an admin on this system. (nor should i be)
I need to be able to get the list of groups for the user during the login process, not just if the logged in user is admin. This appears to be possible via an Apps Script library that has a read only accessor for Groups Service. I need an equivalent api endpoint. Does this exist? I cannot seem to find any documentation for any groups access outside of the admin sdk.
also, if i hit https://www.googleapis.com/auth/groups?userKey=userkey i just get the response "groups" so that's nice...
related/maybe duplicate of:
but the suggestion here points to App Script, not api
[email protected]
has domainexample.org
. Problem is that some users cannot pass authorization_token. I think it is related to those users not being admins on domain I use. – Ishmael