Documentation

GetSharedGroupData

Retrieves data stored in a shared group object, as well as the list of members in the group. The server can access all public and private group data. Shared Groups are designed for sharing data between a very small number of players, please see our guide: https://api.playfab.com/docs/tutorials/landing-players/shared-groups

Request Details

GetSharedGroupDataRequest
Request Properties
GetMembers Boolean

If true, return the list of all members of the shared group.

Keys List<String>

Specific keys to retrieve from the shared group (if not specified, all keys will be returned, while an empty array indicates that no keys should be returned).

SharedGroupId (required) String

Unique identifier for the shared group.

POST https://{{TitleID}}.playfabapi.com/Server/GetSharedGroupData
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "SharedGroupId": "Clan Data",
  "Keys": [
    "ClanKills",
    "LastClanUpdate"
  ],
  "GetMembers": true
}
        

Response Details

GetSharedGroupDataResult
Result Properties
Data Dict<String, SharedGroupDataRecord>

Data for the requested keys.

Members List<String>

List of PlayFabId identifiers for the members of this group, if requested.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "Data": {
      "ClanKills": {
        "Value": "34",
        "LastUpdatedBy": "D984A64B832",
        "LastUpdated": "2015-01-03T17:44:21Z",
        "Permission": "Public"
      },
      "LastClanUpdate": {
        "Value": "2015-01-03T17:44:21Z",
        "LastUpdatedBy": "D984A64B832",
        "LastUpdated": "2015-01-03T17:44:21Z",
        "Permission": "Private"
      }
    },
    "Members": [
      "D984A64B832",
      "F74A523E1562"
    ]
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code
InvalidSharedGroupId 1088