Method: monetization.subscriptions.create
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
नई सदस्यता बनाता है. जोड़े गए नए बुनियादी प्लान तब तक ड्राफ़्ट की स्थिति में रहेंगे, जब तक उन्हें चालू नहीं किया जाता.
एचटीटीपी अनुरोध
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions
यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ के पैरामीटर
पैरामीटर |
packageName |
string
ज़रूरी है. पैरंट ऐप्लिकेशन (पैकेज का नाम) जिसके लिए सदस्यता बनानी चाहिए. सदस्यता संसाधन पर PackageName फ़ील्ड के बराबर होना चाहिए.
|
क्वेरी पैरामीटर
पैरामीटर |
productId |
string
ज़रूरी है. सदस्यता के लिए इस्तेमाल किया जाने वाला आईडी. इस फ़ॉर्मैट की ज़रूरी शर्तों के बारे में जानने के लिए, सदस्यता के संसाधन पर productId फ़ील्ड का दस्तावेज़ देखें.
|
regionsVersion |
object (RegionsVersion )
ज़रूरी है. सदस्यता के लिए इस्तेमाल किए जा रहे देशों/इलाकों का वर्शन.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Subscription
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब होने पर, रिस्पॉन्स के मुख्य हिस्से में Subscription
का नया इंस्टेंस शामिल किया जाता है.
अनुमति देने के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/androidpublisher
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eCreates a new subscription for a specified Android app package.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the package name, subscription ID, and regions version in the request.\u003c/p\u003e\n"],["\u003cp\u003eThe newly created subscription will initially be in draft state and needs to be activated.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003eSubscription\u003c/code\u003e resource, and a successful response will return the newly created \u003ccode\u003eSubscription\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["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"],null,["# Method: monetization.subscriptions.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a new subscription. Newly added base plans will remain in draft state until activated.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. The parent app (package name) for which the subscription should be created. Must be equal to the packageName field on the Subscription resource. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `productId` | `string` Required. The ID to use for the subscription. For the requirements on this format, see the documentation of the productId field on the Subscription resource. |\n| `regionsVersion` | `object (`[RegionsVersion](/android-publisher/api-ref/rest/v3/RegionsVersion)`)` Required. The version of the available regions being used for the subscription. |\n\n### Request body\n\nThe request body contains an instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Subscription](/android-publisher/api-ref/rest/v3/monetization.subscriptions#Subscription).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]