Method: achievements.updateMultiple

Updates multiple achievements for the currently authenticated player.

HTTP request

POST https://games.googleapis.com/games/v1/achievements/updateMultiple

Request body

The request body contains an instance of UpdateMultipleAchievements.

Response body

Response message for achievements.updateMultiple rpc.

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "updatedAchievements": [
    {
      object (UpdatedAchievement)
    }
  ]
}
Fields
kind

string

Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateMultipleResponse.

updatedAchievements[]

object (UpdatedAchievement)

The updated state of the achievements.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/games
  • https://www.googleapis.com/auth/games_lite

For more information, see the OAuth 2.0 Overview.

UpdateMultipleAchievements

A list of achievement update requests.

JSON representation
{
  "kind": string,
  "updates": [
    {
      object (UpdateAchievement)
    }
  ]
}
Fields
kind

string

Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateMultipleRequest.

updates[]

object (UpdateAchievement)

The individual achievement update requests.

UpdateAchievement

A request to update an achievement.

JSON representation
{
  "kind": string,
  "achievementId": string,
  "updateType": enum (AchievementUpdateType),
  "incrementPayload": {
    object (AchievementIncrement)
  },
  "setStepsAtLeastPayload": {
    object (SetAchievementSteps)
  }
}
Fields
kind

string

Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateRequest.

achievementId

string

The achievement this update is being applied to.

updateType

enum (AchievementUpdateType)

The type of update being applied.

incrementPayload

object (AchievementIncrement)

The payload if an update of type INCREMENT was requested for the achievement.

setStepsAtLeastPayload

object (SetAchievementSteps)

The payload if an update of type SET_STEPS_AT_LEAST was requested for the achievement.

AchievementUpdateType

Possible achievement update types.

Enums
REVEAL Achievement is revealed.
UNLOCK Achievement is unlocked.
INCREMENT Achievement is incremented.
SET_STEPS_AT_LEAST Achievement progress is set to at least the passed value.

AchievementIncrement

The payload to request to increment an achievement.

JSON representation
{
  "kind": string,
  "steps": integer,
  "requestId": string
}
Fields
kind

string

Uniquely identifies the type of this resource. Value is always the fixed string games#GamesAchievementIncrement.

steps

integer

The number of steps to be incremented.

requestId

string (int64 format)

The requestId associated with an increment to an achievement.

SetAchievementSteps

The payload to request to increment an achievement.

JSON representation
{
  "kind": string,
  "steps": integer
}
Fields
kind

string

Uniquely identifies the type of this resource. Value is always the fixed string games#GamesAchievementSetStepsAtLeast.

steps

integer

The minimum number of steps for the achievement to be set to.

UpdatedAchievement

An updated achievement.

JSON representation
{
  "kind": string,
  "achievementId": string,
  "updateOccurred": boolean,
  "currentState": enum (UpdatedAchievementState),
  "currentSteps": integer,
  "newlyUnlocked": boolean
}
Fields
kind

string

Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateResponse.

achievementId

string

The achievement this update is was applied to.

updateOccurred

boolean

Whether the requested updates actually affected the achievement.

currentState

enum (UpdatedAchievementState)

The current state of the achievement.

currentSteps

integer

The current steps recorded for this achievement if it is incremental.

newlyUnlocked

boolean

Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player).

UpdatedAchievementState

Possible updated achievement states.

Enums
HIDDEN Achievement is hidden.
REVEALED Achievement is revealed.
UNLOCKED Achievement is unlocked.