Documentation

UpdateSharedGroupData

Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group can update the 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

Note that in the case of multiple calls to write to the same shared group data keys, the last write received by the PlayFab service will determine the value available to subsequent read operations. For scenarios requiring coordination of data updates, it is recommended that titles make use of user data with read permission set to public, or a combination of user data and shared group data.

UpdateSharedGroupDataRequest
Request Properties
Data Dict<String, String>

Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may not begin with a '!' character or be null.

KeysToRemove List<String>

Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language constraints. Use this to delete the keys directly.

Permission UserDataPermission

Permission to be applied to all user data keys in this request.

SharedGroupId (required) String

Unique identifier for the shared group.

POST https://{{TitleID}}.playfabapi.com/Client/UpdateSharedGroupData
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "SharedGroupId": "Clan Data",
  "Data": {
    "ClanKills": "34",
    "LastClanUpdate": "2014-10-03T09:21:14Z"
  },
  "Permission": "Public"
}
        

Response Details

UpdateSharedGroupDataResult
Result Properties

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8


Authentication

SessionTicket

Possible Error Codes

Name Code
NotAuthorized 1089