方法: players.getScopedPlayerIds

为当前通过身份验证的用户检索限定范围的玩家标识符。

HTTP 请求

GET https://games.googleapis.com/games/v1/players/me/scopedIds

请求正文

请求正文必须为空。

响应正文

限定范围的玩家标识符。

如果成功,响应正文将包含以下结构的数据

JSON 表示
{
  "gamePlayerId": string,
  "developerPlayerKey": string
}
字段
gamePlayerId

string

游戏限定范围的玩家标识符。这与 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 概览