Method: monetization.subscriptions.create
Erstellt ein neues Abo. Neu hinzugefügte Base Plans bleiben bis zur Aktivierung im Entwurfsstatus.
HTTP-Anfrage
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
packageName |
string
Erforderlich. Die übergeordnete App (Paketname), für die das Abo erstellt werden soll. Muss mit dem Feld „packageName“ in der Aboressource übereinstimmen.
|
Abfrageparameter
Parameter |
productId |
string
Erforderlich. Die für das Abo zu verwendende ID. Die Anforderungen an dieses Format findest du in der Dokumentation des Felds „productId“ in der Aboressource.
|
regionsVersion |
object (RegionsVersion )
Erforderlich. Die Version der verfügbaren Regionen, die für das Abo verwendet wird.
|
Anfragetext
Der Anfragetext enthält eine Instanz von Subscription
.
Antworttext
Bei Erfolg enthält der Antworttext eine neu erstellte Instanz von Subscription
.
Autorisierungsbereiche
Erfordert den folgenden OAuth-Bereich:
https://www.googleapis.com/auth/androidpublisher
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-12-17 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-12-17 (UTC)."],[[["Creates a new subscription for a specified Android app package."],["Requires providing the package name, subscription ID, and regions version in the request."],["The newly created subscription will initially be in draft state and needs to be activated."],["The request body should contain a `Subscription` resource, and a successful response will return the newly created `Subscription` instance."],["Utilizes the `https://www.googleapis.com/auth/androidpublisher` OAuth scope for authorization."]]],["This document details how to create a new subscription using the Android Publisher API. A `POST` request is sent to a specified URL, including the `packageName` in the path. The request requires `productId` and `regionsVersion` as query parameters. The request body contains the `Subscription` to be created. A successful response returns a newly created `Subscription`. The process uses gRPC Transcoding and requires the `androidpublisher` OAuth scope. Newly added base plans are in draft until activated.\n"]]