Signs the user in 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. If this is the first time a user has signed in with the Google account and CreateAccount is set to true, a new PlayFab account will be created and linked to the Google account. Otherwise, if no PlayFab account is linked to the Google account, an error indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. The current (recommended) method for obtaining a Google account credential in an Android application is to call GoogleSignInAccount.getServerAuthCode() and send the auth code as the ServerAuthCode parameter of this API. Before doing this, you must create an OAuth 2.0 web application client ID in the Google API Console and configure its client ID and secret in the PlayFab Game Manager Google Add-on for your title. This method does not require prompting of the user for additional Google account permissions, resulting in a user experience with the least possible friction. For more information about obtaining the server auth code, see The previous (deprecated) method was to obtain an OAuth access token by calling GetAccessToken() on the client and passing it as the AccessToken parameter to this API. for the with the Google OAuth 2.0 Access Token. More information on this change can be found in the Google developer documentation (

Request Properties
CreateAccount Boolean

Automatically create a PlayFab account if one is not currently linked to this ID.

EncryptedRequest String

Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only).

InfoRequestParameters GetPlayerCombinedInfoRequestParams

Flags for which pieces of info to return for the user.

PlayerSecret String

Player secret that is used to verify API request signatures (Enterprise Only).

ServerAuthCode String

OAuth 2.0 server authentication code obtained on the client by calling the getServerAuthCode() ( Google client API.

TitleId (required) String

Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected.

POST https://{{TitleID}}
    Content-Type: application/json
  "ServerAuthCode": "4/TPdB1ter7eJ7cQ0lGBa6p1Cn-sSHJEXmPJ7t1-v4_ds#",
  "CreateAccount": false,
  "TitleId": "1"

Response Details

Result Properties
EntityToken EntityTokenResponse

If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and returned.

InfoResultPayload GetPlayerCombinedInfoResultPayload

Results for requested info.

LastLoginTime DateTime

The time of this user's previous login. If there was no previous login, then it's DateTime.MinValue

NewlyCreated (required) Boolean

True if the account was newly created on this login.

PlayFabId String

Player's unique PlayFabId.

SessionTicket String

Unique token authorizing the user and game at the server level, for the current session.

SettingsForUser UserSettings

Settings specific to this user.

TreatmentAssignment TreatmentAssignment

The experimentation treatments for this user at the time of login.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
  "code": 200,
  "status": "OK",
  "data": {
    "SessionTicket": "50DF92E291CCD4C3---A54F-8D3909FF54DEE10-B7817722BC94E536.A6DCCFE1C9709ABB",
    "PlayFabId": "50DF92E291CCD4C3",
    "NewlyCreated": false



Possible Error Codes

Name Code
GoogleOAuthError 1271
GoogleOAuthNoIdTokenIncludedInResponse 1275
GoogleOAuthNotConfiguredForTitle 1270
InvalidGoogleToken 1026
RequestViewConstraintParamsNotAllowed 1303