Method: grants.create
به یک کاربر به بسته داده شده دسترسی بدهید.
درخواست HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/{parent=developers/*/users/*}/grants
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
مولفه های |
---|
parent | string ضروری. کاربری که نیاز به مجوز دارد. قالب: developers/{developer}/users/{user} |
درخواست بدن
بدنه درخواست شامل یک نمونه از Grant
است.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی یک نمونه جدید از Grant
است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/androidpublisher
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["Grant access to a specific package for a designated user using an HTTP POST request."],["The request should target the URL `https://androidpublisher.googleapis.com/androidpublisher/v3/{parent=developers/*/users/*}/grants` and include user details in the path parameter."],["Provide the necessary grant details within the request body, adhering to the structure of the `Grant` object as defined in the API reference."],["Upon successful execution, the response will contain the newly created `Grant` object, confirming the access permission."],["Authorization necessitates the use of the `https://www.googleapis.com/auth/androidpublisher` OAuth scope."]]],["A `POST` request is sent to `https://androidpublisher.googleapis.com/androidpublisher/v3/{parent=developers/*/users/*}/grants` to grant user access to a package. The `parent` path parameter, formatted as `developers/{developer}/users/{user}`, specifies the user receiving permission. The request body includes a `Grant` instance, and a successful response returns a new `Grant` instance. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope. The URL follows gRPC Transcoding syntax.\n"]]