Shared Group Data - Get Shared Group Data

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://docs.microsoft.com/gaming/playfab/features/social/groups/using-shared-group-data

POST https://titleId.playfabapi.com/Server/GetSharedGroupData

Request Header

Name Required Type Description
X-SecretKey True

string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
SharedGroupId True

string

Unique identifier for the shared group.

GetMembers

boolean

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

Keys

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).

Responses

Name Type Description
200 OK

GetSharedGroupDataResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

GetSharedGroupDataRequest
GetSharedGroupDataResult
SharedGroupDataRecord
UserDataPermission

Indicates whether a given data key is private (readable only by the player) or public (readable by all players). When a player makes a GetUserData request about another player, only keys marked Public will be returned.

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

GetSharedGroupDataRequest

Name Type Description
GetMembers

boolean

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

Keys

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

string

Unique identifier for the shared group.

GetSharedGroupDataResult

Name Type Description
Data

SharedGroupDataRecord

Data for the requested keys.

Members

string[]

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

SharedGroupDataRecord

Name Type Description
LastUpdated

string

Timestamp for when this data was last updated.

LastUpdatedBy

string

PlayFabId of the user to last update this value.

Permission

UserDataPermission

Indicates whether this data can be read by all users (public) or only members of the group (private).

Value

string

Data stored for the specified group data key.

UserDataPermission

Indicates whether a given data key is private (readable only by the player) or public (readable by all players). When a player makes a GetUserData request about another player, only keys marked Public will be returned.

Name Type Description
Private

string

Public

string

Error Codes

Name Code
InvalidSharedGroupId 1088