Method: accesstokens.generateRecallPlayGroupingApiToken
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
以要求中提供的喚回工作階段 ID 識別 PGS 使用者,為 PGS 使用者產生 Play Grouping API 權杖。
HTTP 要求
POST https://games.googleapis.com/games/v1/accesstokens/generateRecallPlayGroupingApiToken
查詢參數
參數 |
packageName |
string
必要欄位。要產生權杖的應用程式套件名稱 (例如 com.example.mygame)。
|
persona |
string
必要欄位。與權杖建立關聯的人物。人物是開發人員提供的穩定 ID。必須是根據開發人員自己的使用者身分系統,從使用者帳戶 ID 和使用者個人資料 ID (如果應用程式具有概念) 中確定產生 (例如單向雜湊)。
|
recallSessionId |
string
必要欄位。由伺服器產生的不透明字串,用於編碼所有必要資訊,識別特定 PGS 播放器 / Google 使用者和應用程式。如要瞭解如何整合喚回度並取得工作階段 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 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間: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)."]]