# Method: accesstokens.generateRecallPlayGroupingApiToken

- [HTTP request](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#body.HTTP_TEMPLATE)
- [Query parameters](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#body.QUERY_PARAMETERS)
- [Request body](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#body.request_body)
- [Response body](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#body.response_body)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#body.GenerateRecallPlayGroupingApiTokenResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#body.aspect)
- [Try it!](https://developer.android.com/games/services/web/api/rest/v1/accesstokens/generateRecallPlayGroupingApiToken#try-it)

Generates a Play Grouping API token for the PGS user identified by the Recall session ID provided in the request.

### HTTP request

`POST https://games.googleapis.com/games/v1/accesstokens/generateRecallPlayGroupingApiToken`

### Query parameters

|                                                                                                                                                                Parameters                                                                                                                                                                ||
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `packageName`     | `string` Required. App package name to generate the token for (e.g. com.example.mygame).                                                                                                                                                                                                                              |
| `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. |
| `recallSessionId` | `string` Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application. See<https://developer.android.com/games/pgs/recall/recall-setup>on how to integrate with Recall and get session ID.                                            |

### Request body

The request body must be empty.

### Response body

Response for the accesstokens.generateRecallPlayGroupingApiToken RPC.

If successful, the response body contains data with the following structure:

|                                                 JSON representation                                                 |
|---------------------------------------------------------------------------------------------------------------------|
| ``` { "token": { object (https://developer.android.com/games/services/web/api/rest/v1/PlayGroupingApiToken) } } ``` |

|                                                                                   Fields                                                                                   ||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `token` | `object (`[PlayGroupingApiToken](https://developer.android.com/games/services/web/api/rest/v1/PlayGroupingApiToken)`)` Token for accessing the Play Grouping API. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/androidpublisher`

For more information, see the[OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).