Newer Version Available

This content describes an older version of this product. View Latest

Group Members

Members of a specified group. Get the members and add a member to a group. To add a member, the context user must be the group owner or moderator.
Resource
1/chatter/groups/groupId/members
Available since version
23.0
Requires Chatter
Yes
HTTP methods
GET, POST or HEAD
Request body for POST
Root XML tag
<member>
Properties
Name Type Description Available Version
role String The role of the member. One of these values:
  • GroupManager
  • StandardMember
29.0
userId String The user ID of the member to be added to the group. 23.0
Request parameter for POST
Parameter Name Type Description Available Version
role String The role of the member. One of these values:
  • GroupManager
  • StandardMember
29.0
userId String ID of the user to add to the group. 23.0
Request parameters for GET or HEAD
Parameter Name Type Description Available Version
page Integer An integer specifying a page of items. The default value is 0, which returns the first page. 23.0
pageSize Integer Specifies the number of items per page. Valid values are between 1 and 1000. If you don’t specify a size, the default is 25. 23.0
Response body for GET or HEAD
Group Member Page
Response body for POST
Group Member
Example: Add a member to a group
This POST request adds a member to a group:
1/chatter/groups/0F9D00000000I4O/members?userId=005D0000001LLO1
The response is a Group Member response body:
1{
2   "id": "0FBD00000003LRxOAM",
3   "role": "StandardMember",
4   "url": "/services/data/v32.0/chatter/group-memberships/0FBD00000003LRxOAM",
5   "user": {
6      "companyName": "Universal Containers",
7      "firstName": "Gordon",
8      "id": "005D0000001LLO1IAO",
9      "isActive": true,
10      "isInThisCommunity": true,
11      "lastName": "Johnson",
12      "motif": {
13         "color": "1797C0",
14         "largeIconUrl": "/img/icon/profile64.png",
15         "mediumIconUrl": "/img/icon/profile32.png",
16         "smallIconUrl": "/img/icon/profile16.png"
17      },
18      "mySubscription": {
19         "id": "0E8D0000000T5ZUKA0",
20         "url": "/services/data/v32.0/chatter/subscriptions/0E8D0000000T5ZUKA0"
21      },
22      "name": "Gordon Johnson",
23      "photo": {
24         "fullEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cPhKrC7plNhUw5eOz7Aj1u-oFL0K-ff2oe04ZAmT2MqC",
25         "largePhotoUrl": "https://instance_name/profilephoto/729D00000000LJL/F",
26         "photoVersionId": "729D00000000LJLIA2",
27         "smallPhotoUrl": "https://instance_name/profilephoto/729D00000000LJL/T",
28         "standardEmailPhotoUrl": "https://instance_name/ncsphoto/SqRfG_-PUTY6KtfOp_f0cPhKrC7plNhUw5eOz7Aj1u-6d5rE2mNaMaBZfGnFX65O",
29         "url": "/services/data/v32.0/chatter/users/005D0000001LLO1IAO/photo"
30      },
31      "title": "VP Sales",
32      "type": "User",
33      "url": "/services/data/v32.0/chatter/users/005D0000001LLO1IAO",
34      "userType": "Internal"
35   }
36}

If the group is private, the response is 403. To request to join the group, send a POST request to the Group Members—Private resource (/chatter/groups/groupId/members/requests).

Note