REST Resource: partners.userSessions
Stay organized with collections
Save and categorize content based on your preferences.
Resource: UserSession
A user session contains a short-lived token that includes information required to interact with Google Payments Reseller Platform using the following web endpoints.
- A user session token should be generated dynamically for an authenticated user. You should refrain from sharing a token directly with a user in an unauthenticated context, such as SMS, or email.
- You can re-generate new session tokens repeatedly for same
generate
request if necessary, regardless of the previous tokens being expired or not. You don't need to worry about multiple sessions resulting in duplicate fulfillments as guaranteed by the same subscription id.
Please refer to the Google Managed Signup documentation for additional integration details.
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 (Timestamp format)
Output only. The time at which the user session expires. Uses RFC 3339, where generated output will always be Z-normalized and uses 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 |
|
This API replaces user authorized OAuth consent based APIs (Create, Entitle). |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[[["\u003cp\u003eUserSession provides a short-lived token for interacting with Google Payments Reseller Platform web endpoints.\u003c/p\u003e\n"],["\u003cp\u003eThe UserSession token should be dynamically generated for authenticated users and not shared directly in unauthenticated contexts.\u003c/p\u003e\n"],["\u003cp\u003eNew UserSession tokens can be repeatedly re-generated for the same request, regardless of previous token expiration.\u003c/p\u003e\n"],["\u003cp\u003eThe token contains encrypted user intent and request information, used when redirecting users to Google.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egenerate\u003c/code\u003e method replaces previous OAuth consent-based APIs for user authorization.\u003c/p\u003e\n"]]],["User sessions contain short-lived tokens for interacting with Google Payments Reseller Platform. Tokens are dynamically generated for authenticated users and should not be shared in unauthenticated contexts. New tokens can be repeatedly generated, even if previous ones haven't expired. The JSON representation includes a `token` (string) and `expireTime` (Timestamp string). The `generate` method replaces OAuth consent-based APIs.\n"],null,["# REST Resource: partners.userSessions\n\n- [Resource: UserSession](#UserSession)\n - [JSON representation](#UserSession.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: UserSession\n---------------------\n\nA user session contains a short-lived token that includes information required to interact with Google Payments Reseller Platform using the following web endpoints.\n\n- A user session token should be generated dynamically for an authenticated user. You should refrain from sharing a token directly with a user in an unauthenticated context, such as SMS, or email.\n- You can re-generate new session tokens repeatedly for same `generate` request if necessary, regardless of the previous tokens being expired or not. You don't need to worry about multiple sessions resulting in duplicate fulfillments as guaranteed by the same subscription id.\n\nPlease refer to the [Google Managed Signup](/payments/reseller/subscription/reference/index/User.Signup.Integration/Google.Managed.Signup) documentation for additional integration details.\n\n| JSON representation |\n|---------------------------------------------------|\n| ``` { \"token\": string, \"expireTime\": string } ``` |\n\n| Fields ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n| `expireTime` | `string (`[Timestamp](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 uses 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\"`. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|\n| ### [generate](/payments/reseller/subscription/reference/rest/v1/partners.userSessions/generate) | This API replaces user authorized OAuth consent based APIs (Create, Entitle). |"]]