Method: achievements.unlock
Stay organized with collections
Save and categorize content based on your preferences.
Unlocks this achievement for the currently authenticated player.
HTTP request
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/unlock
Path parameters
Parameters |
achievementId |
string
The ID of the achievement used by this method.
|
Request body
The request body must be empty.
Response body
An achievement unlock response
If successful, the response body contains data with the following structure:
JSON representation |
{
"kind": string,
"newlyUnlocked": boolean
} |
Fields |
kind |
string
Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUnlockResponse .
|
newlyUnlocked |
boolean
Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player).
|
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-28 UTC."],[],[],null,["# Method: achievements.unlock\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.UnlockAchievementResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUnlocks this achievement for the currently authenticated player.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/achievements/{achievementId}/unlock`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------|\n| `achievementId` | `string` The ID of the achievement used by this method. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nAn achievement unlock response\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------|\n| ``` { \"kind\": string, \"newlyUnlocked\": boolean } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#achievementUnlockResponse`. |\n| `newlyUnlocked` | `boolean` Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player). |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]