Getting a Group List for a Member

Users can get a list of groups that they are a member of.

The following sample code shows how to get a list of groups that the current user is a member of.

curl -v -X GET \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Accept: application/vnd.kii.GroupsRetrievalResponse+json" \
  "https://api.kii.com/api/apps/{APP_ID}/groups?is_member={USER_ID}"

Kii Cloud will respond with a list of groups as follows:

< 200
< Content-Type: application/vnd.kii.GroupsRetrievalResponse+json
<
{
  "groups" : [{
    "groupID" : "{GROUP_ID_#1}",
    "name" : "{NAME_OF_GROUP_#1}",
    "owner" : "{USER_ID_OF_GROUP_#1_OWNER}"
  }, {
    "groupID" : "{GROUP_ID_#2}",
    "name" : "{NAME_OF_GROUP_#2}",
    "owner" : "{USER_ID_OF_GROUP_#2_OWNER}"
  } ]
}