Method: grants.create
Cấp cho người dùng quyền truy cập vào gói đã cho.
Yêu cầu HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/{parent=developers/*/users/*}/grants
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Các tham số |
parent |
string
Bắt buộc. Người dùng cần được cấp quyền. Định dạng: nhà phát triển/{developer}/người dùng/{user}
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của Grant
.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một thực thể mới được tạo của Grant
.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/androidpublisher
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-22 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-22 UTC."],[[["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"]]