How to get the list of members in a Google group in Google app script (Admin SDK)?

后端 未结 2 1203
抹茶落季
抹茶落季 2020-12-10 21:19

I would like to get a list of members in a Google group using Admin SDK.

But im not getting how to do this. I found below link - https://developers.google.com/admin-

2条回答
  •  半阙折子戏
    2020-12-10 21:50

    Try to use Members:list to retrive list of all members in a group.

    HTTP request

    GET https://www.googleapis.com/admin/directory/v1/groups/groupKey/members
    

    Every request your application sends to the Directory API must include an authorization token. The token also identifies your application to Google. Your application must use OAuth 2.0 to authorize requests.

    HTTP response:

    {
      "kind": "admin#directory#members",
      "etag": etag,
      "members": [
        members Resource
      ],
      "nextPageToken": string
    }
    

提交回复
热议问题