Method: players.getScopedPlayerIds

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

HTTP 请求

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

请求正文

请求正文必须为空。

响应正文

限定范围的玩家标识符。

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

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

string

游戏范围的玩家标识符。此 ID 与 player.get gamePlayerId 字段中返回的 ID 相同。

developerPlayerKey

string

指定开发者的所有游戏中玩家的标识符。在一个开发者的所有游戏中,每个玩家都具有相同的 developerPlayerKey。如果将游戏转移给其他开发者,该游戏的开发者玩家密钥会发生变化。请注意,gamePlayerId 将保持不变。

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/games
  • https://www.googleapis.com/auth/games_lite

有关详情,请参阅 OAuth 2.0 概览