# REST Resource: partners.userSessions

- [Resource: UserSession](https://developers.google.com/payments/reseller/subscription/reference/rest/v1/partners.userSessions#UserSession)
  - [JSON representation](https://developers.google.com/payments/reseller/subscription/reference/rest/v1/partners.userSessions#UserSession.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/payments/reseller/subscription/reference/rest/v1/partners.userSessions#METHODS_SUMMARY)

## Resource: UserSession

Contains a short-lived token containing information required to interact with the Google Payments Reseller Platform via web endpoints.

- Generate a user session token dynamically for an authenticated user. Do not share a token directly with a user in an unauthenticated context, such as SMS or email.
- You can regenerate new session tokens repeatedly for the same `generate` request if necessary, regardless of whether previous tokens have expired. Multiple sessions will not result in duplicate fulfillments because the `subscription ID` guarantees uniqueness.

For more integration details, see the [Google Managed Signup](https://developers.google.com/payments/reseller/subscription/reference/index/User.Signup.Integration/Google.Managed.Signup) documentation.

| JSON representation |
|---|
| ``` { "token": string, "expireTime": string } ``` |

| Fields ||
|---|---|
| `token` | `string` Output only. The encrypted token of the user session, including the information of the user's intent and request. This token should be provided when redirecting the user to Google. |
| `expireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the user session expires. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/payments/reseller/subscription/reference/rest/v1/partners.userSessions/generate` | This API replaces user authorized OAuth consent based APIs (Create, Entitle). |