Account Management - Link Google Account
Links the currently signed-in user account to their Google account, using their Google account credentials
POST https://titleId.playfabapi.com/Client/LinkGoogleAccount
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Authorization | True |
string |
This API requires a client session ticket, available from any Client Login function. |
Request Body
Name | Type | Description |
---|---|---|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
ForceLink |
boolean |
If another user is already linked to the account, unlink the other user and re-link. If the current user is already linked, link both accounts |
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. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-Authorization
This API requires a client session ticket, available from any Client Login function.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Api |
The basic wrapper around every failed API response |
Link |
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. |
Link |
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 |
LinkGoogleAccountRequest
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.
Name | Type | Description |
---|---|---|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
ForceLink |
boolean |
If another user is already linked to the account, unlink the other user and re-link. If the current user is already linked, link both accounts |
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. |
LinkGoogleAccountResult
Error Codes
Name | Code |
---|---|
AccountAlreadyLinked | 1011 |
GoogleOAuthError | 1271 |
GoogleOAuthNoIdTokenIncludedInResponse | 1275 |
GoogleOAuthNotConfiguredForTitle | 1270 |
InvalidGoogleToken | 1026 |
LinkedAccountAlreadyClaimed | 1012 |