Method: accesstokens.generateRecallPlayGroupingApiToken
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
为请求中提供的 Recall 会话 ID 标识的 PGS 用户生成 Play Grouping API 令牌。
HTTP 请求
POST https://games.googleapis.com/games/v1/accesstokens/generateRecallPlayGroupingApiToken
查询参数
参数 |
packageName |
string
必需。要为其生成令牌的应用软件包名称(例如 com.example.mygame)。
|
persona |
string
必需。要与令牌关联的角色。角色是开发者提供的用户稳定标识符。必须根据开发者自己的用户身份系统,从用户账号 ID 和用户个人资料 ID(如果应用具有此概念)确定性生成(例如作为单向哈希)。
|
recallSessionId |
string
必需。服务器生成的不透明字符串,用于编码识别 PGS 玩家 / Google 用户和应用的所有必要信息。如需了解如何与 Recall 集成并获取会话 ID,请参阅 https://developer.android.com/games/pgs/recall/recall-setup。
|
响应正文
对 accesstokens.generateRecallPlayGroupingApiToken RPC 的响应。
如果成功,响应正文将包含结构如下的数据:
字段 |
token |
object (PlayGroupingApiToken )
用于访问 Play Grouping API 的令牌。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidpublisher
如需了解详情,请参阅 OAuth 2.0 概览。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Method: accesstokens.generateRecallPlayGroupingApiToken\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GenerateRecallPlayGroupingApiTokenResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGenerates a Play Grouping API token for the PGS user identified by the Recall session ID provided in the request.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/accesstokens/generateRecallPlayGroupingApiToken`\n\n### Query parameters\n\n| Parameters ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. App package name to generate the token for (e.g. com.example.mygame). |\n| `persona` | `string` Required. Persona to associate with the token. Persona is a developer-provided stable identifier of the user. Must be deterministically generated (e.g. as a one-way hash) from the user account ID and user profile ID (if the app has the concept), according to the developer's own user identity system. |\n| `recallSessionId` | `string` Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application. See \u003chttps://developer.android.com/games/pgs/recall/recall-setup\u003e on how to integrate with Recall and get session ID. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse for the accesstokens.generateRecallPlayGroupingApiToken RPC.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------|\n| ``` { \"token\": { object (/games/services/web/api/rest/v1/PlayGroupingApiToken) } } ``` |\n\n| Fields ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `token` | `object (`[PlayGroupingApiToken](/games/services/web/api/rest/v1/PlayGroupingApiToken)`)` Token for accessing the Play Grouping API. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]