Method: players.getScopedPlayerIds
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://games.googleapis.com/games/v1/players/me/scopedIds
响应正文
限定范围的玩家标识符。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"gamePlayerId": string,
"developerPlayerKey": string
} |
字段 |
gamePlayerId |
string
游戏级范围的玩家标识符。此 ID 与 players.get gamePlayerId 字段中返回的 ID 相同。
|
developerPlayerKey |
string
玩家在指定开发者的所有游戏中的标识符。同一开发者的所有游戏中的每位玩家都有相同的 developerPlayerKey。如果将游戏转移给其他开发者,游戏的开发者玩家标识键将会随之而变。请注意,gamePlayerId 将保持不变。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
如需了解详情,请参阅 OAuth 2.0 概览。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):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)."]]