Quests: accept

Requires authorization

Indicates that the currently authorized user will participate in the quest. Try it now.

Request

HTTP request

POST https://www.googleapis.com/games/v1/quests/questId/accept

Parameters

Parameter name Value Description
Path parameters
questId string The ID of the quest.
Optional query parameters
consistencyToken long The last-seen mutation timestamp.
language string The preferred language to use for strings returned by this method.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/games

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "games#quest",
  "id": string,
  "applicationId": string,
  "name": string,
  "description": string,
  "iconUrl": string,
  "isDefaultIconUrl": boolean,
  "bannerUrl": string,
  "isDefaultBannerUrl": boolean,
  "startTimestampMillis": long,
  "endTimestampMillis": long,
  "acceptedTimestampMillis": long,
  "lastUpdatedTimestampMillis": long,
  "notifyTimestampMillis": long,
  "state": string,
  "milestones": [
    {
      "kind": "games#questMilestone",
      "id": string,
      "criteria": [
        {
          "kind": "games#questCriterion",
          "eventId": string,
          "completionContribution": {
            "kind": "games#questContribution",
            "value": long,
            "formattedValue": string
          },
          "currentContribution": {
            "kind": "games#questContribution",
            "value": long,
            "formattedValue": string
          },
          "initialPlayerProgress": {
            "kind": "games#questContribution",
            "value": long,
            "formattedValue": string
          }
        }
      ],
      "completionRewardData": bytes,
      "state": string
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#quest.
id string The ID of the quest.
applicationId string The ID of the application this quest is part of.
name string The name of the quest.
description string The description of the quest.
iconUrl string The icon image URL for the quest.
isDefaultIconUrl boolean Indicates whether the icon image being returned is a default image, or is game-provided.
bannerUrl string The banner image URL for the quest.
isDefaultBannerUrl boolean Indicates whether the banner image being returned is a default image, or is game-provided.
startTimestampMillis long The timestamp at which the quest becomes active in milliseconds since the epoch in UTC.
endTimestampMillis long The timestamp at which the quest ceases to be active in milliseconds since the epoch in UTC.
acceptedTimestampMillis long The timestamp at which the user accepted the quest in milliseconds since the epoch in UTC. Only present if the player has accepted the quest.
lastUpdatedTimestampMillis long The timestamp at which the quest was last updated by the user in milliseconds since the epoch in UTC. Only present if the player has accepted the quest.
notifyTimestampMillis long The timestamp at which the user should be notified that the quest will end soon in milliseconds since the epoch in UTC.
state string The state of the quest.
Possible values are:
  • "UPCOMING": The quest is upcoming. The user can see the quest, but cannot accept it until it is open.
  • "OPEN": The quest is currently open and may be accepted at this time.
  • "ACCEPTED": The user is currently participating in this quest.
  • "COMPLETED": The user has completed the quest.
  • "FAILED": The quest was attempted but was not completed before the deadline expired.
  • "EXPIRED": The quest has expired and was not accepted.
  • "DELETED": The quest should be deleted from the local database.


Acceptable values are:
  • "ACCEPTED"
  • "COMPLETED"
  • "DELETED"
  • "EXPIRED"
  • "FAILED"
  • "OPEN"
  • "UPCOMING"
milestones[] list The quest milestones.
milestones[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questMilestone.
milestones[].id string The milestone ID.
milestones[].criteria[] list The criteria of the milestone.
milestones[].criteria[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questCriterion.
milestones[].criteria[].eventId string The ID of the event the criterion corresponds to.
milestones[].criteria[].completionContribution nested object The total number of times the associated event must be incremented for the player to complete this quest.
milestones[].criteria[].completionContribution.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questContribution.
milestones[].criteria[].completionContribution.value long The value of the contribution.
milestones[].criteria[].completionContribution.formattedValue string The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console.
milestones[].criteria[].currentContribution nested object The number of increments the player has made toward the completion count event increments required to complete the quest. This value will not exceed the completion contribution.
There will be no currentContribution until the player has accepted the quest.
milestones[].criteria[].currentContribution.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questContribution.
milestones[].criteria[].currentContribution.value long The value of the contribution.
milestones[].criteria[].currentContribution.formattedValue string The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console.
milestones[].criteria[].initialPlayerProgress nested object The value of the event associated with this quest at the time that the quest was accepted. This value may change if event increments that took place before the start of quest are uploaded after the quest starts.
There will be no initialPlayerProgress until the player has accepted the quest.
milestones[].criteria[].initialPlayerProgress.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#questContribution.
milestones[].criteria[].initialPlayerProgress.value long The value of the contribution.
milestones[].criteria[].initialPlayerProgress.formattedValue string The formatted value of the contribution as a string. Format depends on the configuration for the associated event definition in the Play Games Developer Console.
milestones[].completionRewardData bytes The completion reward data of the milestone, represented as a Base64-encoded string. This is a developer-specified binary blob with size between 0 and 2 KB before encoding.
milestones[].state string The current state of the milestone.
Possible values are:
  • "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been claimed.
  • "CLAIMED" - The milestone is complete and has been claimed.
  • "NOT_COMPLETED" - The milestone has not yet been completed.
  • "NOT_STARTED" - The milestone is for a quest that has not yet been accepted.


Acceptable values are:
  • "CLAIMED"
  • "COMPLETED_NOT_CLAIMED"
  • "NOT_COMPLETED"
  • "NOT_STARTED"

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Enviar comentarios sobre…

Play Games Services for Web
Play Games Services for Web