Share via


Addon - Create Or Update Google

Creates the Google addon on a title, or updates it if it already exists.

POST https://titleId.playfabapi.com/Addon/CreateOrUpdateGoogle

Request Header

Name Required Type Description
X-EntityToken True

string

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Request Body

Name Type Description
AppLicenseKey

string

Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google receipt validation.

AppPackageID

string

Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google receipt validation.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Entity

EntityKey

The optional entity to perform this action on. Defaults to the currently logged in entity.

ErrorIfExists

boolean

If an error should be returned if the addon already exists.

OAuthClientID

string

Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". Required if using Google Authentication.

OAuthClientSecret

string

Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". Required if using Google Authentication.

OAuthCustomRedirectUri

string

Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own domain.

ServiceAccountKey

string

Needed to enable pending purchase handling and subscription processing.

Responses

Name Type Description
200 OK

CreateOrUpdateGoogleResponse

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

CreateOrUpdateGoogleRequest
CreateOrUpdateGoogleResponse
EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

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

CreateOrUpdateGoogleRequest

Name Type Description
AppLicenseKey

string

Google App License Key obtained after setting up your app in the Google Play developer portal. Required if using Google receipt validation.

AppPackageID

string

Google App Package ID obtained after setting up your app in the Google Play developer portal. Required if using Google receipt validation.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Entity

EntityKey

The optional entity to perform this action on. Defaults to the currently logged in entity.

ErrorIfExists

boolean

If an error should be returned if the addon already exists.

OAuthClientID

string

Google OAuth Client ID obtained through the Google Developer Console by creating a new set of "OAuth Client ID". Required if using Google Authentication.

OAuthClientSecret

string

Google OAuth Client Secret obtained through the Google Developer Console by creating a new set of "OAuth Client ID". Required if using Google Authentication.

OAuthCustomRedirectUri

string

Authorized Redirect Uri obtained through the Google Developer Console. This currently defaults to https://oauth.playfab.com/oauth2/google. If you are authenticating players via browser, please update this to your own domain.

ServiceAccountKey

string

Needed to enable pending purchase handling and subscription processing.

CreateOrUpdateGoogleResponse

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

Name Type Description
Id

string

Unique ID of the entity.

Type

string

Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types

Error Codes

Name Code
AddonAlreadyExists 19008
BillingInformationRequired 1266
CatalogBadRequest 4013
CatalogConfigInvalid 4010
InvalidEntityType 1373
InvalidParams 1000
InvalidTitleId 1004