Method: players.getScopedPlayerIds
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
GET https://games.googleapis.com/games/v1/players/me/scopedIds
回應主體
限定範圍的玩家 ID。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"gamePlayerId": string,
"developerPlayerKey": string
} |
欄位 |
gamePlayerId |
string
遊戲範圍內的玩家 ID。這個 ID 與 Player.get gamePlayerId 欄位傳回的 ID 相同。
|
developerPlayerKey |
string
指定開發人員所有遊戲的玩家 ID。同一開發人員的所有遊戲中,每位玩家都擁有相同的 developerPlayerKey。如果遊戲轉移給其他開發人員,開發人員參考用玩家的主要遊戲就會改變。請注意,gamePlayerId 不會變更。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
詳情請參閱 OAuth 2.0 總覽。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Method: players.getScopedPlayerIds\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ScopedPlayerIds.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nRetrieves scoped player identifiers for currently authenticated user.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/players/me/scopedIds`\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nScoped player identifiers.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------|\n| ``` { \"gamePlayerId\": string, \"developerPlayerKey\": string } ``` |\n\n| Fields ||\n|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gamePlayerId` | `string` Game-scoped player identifier. This is the same id that is returned in players.get gamePlayerId field. |\n| `developerPlayerKey` | `string` Identifier of the player across all games of the given developer. Every player has the same developerPlayerKey in all games of one developer. Developer player key changes for the game if the game is transferred to another developer. Note that gamePlayerId will stay unchanged. |\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)."]]