Documentation

LinkGoogleAccount

Links the currently signed-in user account to their Google account, using their Google account credentials

Request Details

Google sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google sign-in for Android APIs on the device and passing it to this API.

LinkGoogleAccountRequest
Request Properties
ForceLink Boolean

If another user is already linked to the account, unlink the other user and re-link.

ServerAuthCode String

Server authentication code obtained on the client by calling getServerAuthCode() (https://developers.google.com/identity/sign-in/android/offline-access) from Google Play for the user.

POST https://{{TitleID}}.playfabapi.com/Client/LinkGoogleAccount
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "AccessToken": "BInn23arRiCepodeRQ"
}
        

Response Details

LinkGoogleAccountResult
Result Properties

Sample Response

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


Authentication

SessionTicket

Possible Error Codes

Name Code
AccountAlreadyLinked 1011
GoogleOAuthError 1271
GoogleOAuthNoIdTokenIncludedInResponse 1275
GoogleOAuthNotConfiguredForTitle 1270
InvalidGoogleToken 1026
LinkedAccountAlreadyClaimed 1012