AI-generated Key Takeaways
- 
          This API generates a short-lived user session token, replacing OAuth consent for subscription creation and entitlement. 
- 
          The session token allows users to complete the signup flow via Google, and can be regenerated as needed. 
- 
          The API accepts an intent payload specifying either a subscription creation or entitlement request. 
- 
          The request body includes details like the parent partner, subscription information, and subscription ID (for creation). 
- 
          A successful response provides a user session object containing the generated token. 
- HTTP request
- Path parameters
- Request body
- Response body
- IntentPayload
- CreateSubscriptionIntent
- EntitleSubscriptionIntent
- IntentOptions
This API replaces user authorized OAuth consent based APIs (Create, Entitle). Issues a timed session token for the given user intent. You can use the session token to redirect the user to Google to finish the signup flow. You can re-generate new session token repeatedly for the same request if necessary, regardless of the previous tokens being expired or not. By default, the session token is valid for 1 hour.
HTTP request
POST https://paymentsresellersubscription.googleapis.com/v1/{parent=partners/*}/userSessions:generate
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| parent | 
 Required. The parent, the partner that can resell. Format: partners/{partner} | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| {
  "intentPayload": {
    object ( | 
| Fields | |
|---|---|
| intentPayload | 
 The user intent to generate the user session. | 
Response body
Response that contains the details for generated user session.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| {
  "userSession": {
    object ( | 
| Fields | |
|---|---|
| userSession | 
 The generated user session. The token size is proportional to the size of the intent payload. | 
IntentPayload
The payload that describes the user intent.
| JSON representation | 
|---|
| { "intentOptions": { object ( | 
| Fields | |
|---|---|
| intentOptions | 
 Optional. The additional features for the intent. | 
| Union field request. The intent types.requestcan be only one of the following: | |
| createIntent | 
 The request to create a subscription. | 
| entitleIntent | 
 The request to entitle a subscription. | 
CreateSubscriptionIntent
Intent message for creating a Subscription resource.
| JSON representation | 
|---|
| { "parent": string, "subscription": { object ( | 
| Fields | |
|---|---|
| parent | 
 Required. The parent resource name, which is the identifier of the partner. | 
| subscription | 
 Required. The Subscription to be created. | 
| subscriptionId | 
 Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscriptionId, we will directly return that one. | 
| cycleOptions | 
 Optional. The cycle options for the subscription. | 
EntitleSubscriptionIntent
Intent for entitling the previously provisioned subscription to an end user.
| JSON representation | 
|---|
| { "name": string } | 
| Fields | |
|---|---|
| name | 
 Required. The name of the subscription resource that is entitled to the current end user. It is in the format of "partners/{partner_id}/subscriptions/{subscriptionId}". | 
IntentOptions
The options for the intent.
| JSON representation | 
|---|
| { "enableOfferOverride": boolean } | 
| Fields | |
|---|---|
| enableOfferOverride | 
 Optional. If true, Google may use a different product and promotion id from the ones in the  |