Method: achievements.unlock
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
現在認証されているプレーヤーに対してこの実績をロック解除します。
HTTP リクエスト
POST https://games.googleapis.com/games/v1/achievements/{achievementId}/unlock
パスパラメータ
パラメータ |
achievementId |
string
このメソッドで使用される実績の ID。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
実績の達成のレスポンス
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"kind": string,
"newlyUnlocked": boolean
} |
フィールド |
kind |
string
このリソースのタイプを一意に識別します。値は常に固定文字列 games#achievementUnlockResponse です。
|
newlyUnlocked |
boolean
この実績が新たにロック解除されたかどうか(つまり、この実績のロック解除リクエストがプレーヤーにとって初めてのものかどうか)。
|
認可スコープ
次のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
詳しくは、OAuth 2.0 の概要をご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 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)."]]