GET /api/groups/mutual

get a list of groups shared between two users

Success Response Code: 200

Params

Param name Description
user_id
required

the first user


Value: Must be a Integer
other_user_id
required

the second user


Value: Must be a Integer
page
optional

page number of groups to be returned (default=1)


Value: Must be a Integer
per_page
optional

number of groups to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

groups array of Group entries Array<Group>

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com/api/groups/mutual.json?user_id=25&other_user_id=26"

Examples

GET 
200
{
  "groups": [
    {
      "id": 1,
      "name": "test&grøup1",
      "html_name": "test&amp;grøup1",
      "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
      "type": "Group",
      "avatars": {
        "is_system_default": true,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
      },
      "username": "testgrøup1",
      "groupname": "testgrøup1",
      "private": false,
      "external_contributor": false,
      "chat_enabled": false,
      "post_enabled": true,
      "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
      "admin_ids": [
        16
      ],
      "description": null,
      "state": "active",
      "permission": "public",
      "group_type": "standard",
      "member_count": 3,
      "role_key": "member",
      "can_request_membership": false,
      "can_cancel_membership_request": false,
      "can_join": false,
      "can_leave": true,
      "can_administer": false,
      "chat_stream_id": null,
      "post_stream_id": 97
    }
  ]
}