php - admin-sdk: users/list works, but members/list doesn't? -


within company's domain, i'm able search users via call: https://developers.google.com/admin-sdk/directory/v1/reference/users/list (domain: mydomain.com, viewtype: domain_public, , own email sub= in service account authorization.)

i've confirmed web browser, in company can view membership of group in company going https://groups.google.com/a/mycompany/forum/#!members/mygroup.

it seems follow (same api, open company-wide) should able obtain group members via call: https://developers.google.com/admin-sdk/directory/v1/reference/members/list

however, using api explorer, i'm getting:

403 ok - show headers - {  "error": {   "errors": [    {     "domain": "global",     "reason": "forbidden",     "message": "not authorized access resource/api"    }   ],   "code": 403,   "message": "not authorized access resource/api"  } } 

this doesn't seem make sense... permission needs be/can changed @ organization level? (ie admins have allowed user/list haven't yet allowed members/list?)

if somehow intentional behavior within api... why? , has found way around? (screenscraping https://groups.google.com/a/mycompany/forum/#!members/mygroup work, seems insane when there's theoretically api...)

fwiw - i'm trying use php in service running on linux machine, until can working within api explorer, i'm not sure that's relevant. first attempt take code works users/list , make call members/list instead. when failed, tried api explorer , failed there well.

you can admins allow "read" admin api privilege users in domain.

admin console > admin roles > create new role (e.g. "all users groupsapiread") > privileges > admin api privileges (not admin console api privileges) > groups > tick "read" (don't tick create, update or delete).


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -