Method: monetization.subscriptions.delete
با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
اشتراک را حذف می کند. یک اشتراک تنها در صورتی قابل حذف است که هرگز یک طرح پایه منتشر نشده باشد.
درخواست HTTP
DELETE https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
packageName | string مورد نیاز. برنامه والد (نام بسته) برنامه اشتراک برای حذف. |
productId | string مورد نیاز. شناسه محصول منحصر به فرد اشتراک برای حذف. |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ یک شی JSON خالی است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/androidpublisher
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eDeletes a specific subscription within a given app, provided it hasn't had a base plan published.\u003c/p\u003e\n"],["\u003cp\u003eRequires the package name and product ID to identify the subscription to be deleted.\u003c/p\u003e\n"],["\u003cp\u003eUses a DELETE request with no request body and returns an empty response body upon success.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This document outlines how to delete a subscription via an HTTP DELETE request to a specific URL. The URL requires two path parameters: `packageName` and `productId`. The request body must be empty. Upon successful deletion, indicated by a response, an empty JSON object is returned. Subscriptions can only be deleted if they have never had a base plan published. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope. The provided `try-it` feature allows testing this directly.\n"],null,["# Method: monetization.subscriptions.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a subscription. A subscription can only be deleted if it has never had a base plan published.\n\n### HTTP request\n\n`DELETE https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}`\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) of the app of the subscription to delete. |\n| `productId` | `string` Required. The unique product ID of the subscription to delete. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]