Method: accesstokens.generatePlayGroupingApiToken
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat token Play Grouping API untuk pengguna PGS yang diidentifikasi oleh kredensial yang dilampirkan.
Permintaan HTTP
POST https://games.googleapis.com/games/v1/accesstokens/generatePlayGroupingApiToken
Parameter kueri
Parameter |
packageName |
string
Wajib. Nama paket aplikasi untuk membuat token (misalnya, com.example.mygame).
|
persona |
string
Wajib. Persona yang akan dikaitkan dengan token. Persona adalah ID pengguna yang stabil dan disediakan oleh developer. Harus dibuat secara deterministik (misalnya sebagai hash satu arah) dari ID akun pengguna dan ID profil pengguna (jika aplikasi memiliki konsep tersebut), sesuai dengan sistem identitas pengguna developer sendiri.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Respons untuk RPC accesstokens.generatePlayGroupingApiToken.
Jika berhasil, isi respons berisi data dengan struktur berikut:
Kolom |
token |
object (PlayGroupingApiToken )
Token untuk mengakses Play Grouping API.
|
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Untuk informasi selengkapnya, lihat Ringkasan OAuth 2.0.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Method: accesstokens.generatePlayGroupingApiToken\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.GeneratePlayGroupingApiTokenResponse.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 attached credential.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/accesstokens/generatePlayGroupingApiToken`\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\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse for the accesstokens.generatePlayGroupingApiToken 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 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)."]]