- HTTP request
- Request body
- Response body
- Authorization scopes
- RecallTokensCardinalityConstraint
- ConflictingLinksResolutionPolicy
- State
- Try it!
Associate the PGS Player principal encoded in the provided recall session id with an in-game account
HTTP request
POST https://games.googleapis.com/games/v1/recall:linkPersona
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "sessionId": string, "persona": string, "token": string, "cardinalityConstraint": enum ( |
Fields | |
---|---|
sessionId |
Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application. |
persona |
Required. Stable identifier of the in-game account. Please refrain from re-using the same persona for different games. |
token |
Required. Value of the token to create. Opaque to Play Games and assumed to be non-stable (encrypted with key rotation). |
cardinalityConstraint |
Required. Cardinality constraint to observe when linking a persona to a player in the scope of a game. |
conflictingLinksResolutionPolicy |
Required. Resolution policy to apply when the linking of a persona to a player would result in violating the specified cardinality constraint. |
Union field expiration . Optional token expiration time or time to live. expiration can be only one of the following: |
|
expireTime |
Input only. Optional expiration time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
ttl |
Input only. Optional time-to-live. A duration in seconds with up to nine fractional digits, ending with ' |
Response body
Outcome of a persona linking attempt.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"state": enum ( |
Fields | |
---|---|
state |
Output only. State of a persona linking attempt. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidpublisher
For more information, see the OAuth 2.0 Overview.
RecallTokensCardinalityConstraint
Cardinality constraint to observe when linking a persona to a player in the scope of a game.
Enums | |
---|---|
ONE_PERSONA_TO_ONE_PLAYER |
1:1 cardinality between in-game personas and Play Games Services players. By the end of the linking operation only one entry for the player and the persona should remain in the scope of the application. Whether a new link is created or not when this constraint is specified is determined by the chosen
|
ConflictingLinksResolutionPolicy
Resolution policy to apply when the linking of a persona to a player would result in violating the specified cardinality constraint.
Enums | |
---|---|
KEEP_EXISTING_LINKS |
If link(s) between a player and persona already exists which would result in violating the specified For example, if Persona1-Player1 is already linked in the scope of application1 and a new link Persona1-Player2 is attempted to be created in the scope of application1, then the old link will remain and no new link will be added. Note that if the already existing links do violate the specified policy (which could occur if not all |
CREATE_NEW_LINK |
If an existing link between a player and persona already exists which would result in violating the specified For example, if Persona1-Player1 is already linked in the scope of application1 and a new link Persona1-Player2 is attempted to be created in the scope of application1, then the old link will be removed and the new link will be added to replace it. |
State
State of a persona linking attempt.
Enums | |
---|---|
LINK_CREATED |
The link specified in the request was created. |
PERSONA_OR_PLAYER_ALREADY_LINKED |
The link specified in the request was not created because already existing links would result in the new link violating the specified RecallTokensCardinalityConstraint if created. |