REST Resource: grants
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:授权
JSON 表示法 |
{
"name": string,
"packageName": string,
"appLevelPermissions": [
enum (AppLevelPermission )
]
} |
字段 |
name |
string
必需。此授权的资源名称,采用“developers/{developer}/users/{email}/grants/{packageName}”格式。如果此授权用于草稿应用,则此资源名称(而非软件包名称)中将使用应用 ID。
|
packageName |
string
不可变。应用的软件包名称。对于草稿应用,此字段将为空。
|
appLevelPermissions[] |
enum (AppLevelPermission )
针对此应用授予用户的权限。
|
AppLevelPermission
枚举 |
APP_LEVEL_PERMISSION_UNSPECIFIED |
未知或未指定的权限。 |
CAN_ACCESS_APP |
查看应用信息(只读)。已弃用:请尝试定义更精细的 capability。否则,请检查 AppLevelPermission.CAN_VIEW_NON_FINANCIAL_DATA。 |
CAN_VIEW_FINANCIAL_DATA |
查看财务数据。 |
CAN_MANAGE_PERMISSIONS |
管理员(所有权限)。 |
CAN_REPLY_TO_REVIEWS |
回复评价。 |
CAN_MANAGE_PUBLIC_APKS |
发布为正式版,排除设备以及使用 Google Play 应用签名功能。 |
CAN_MANAGE_TRACK_APKS |
发布到测试轨道。 |
CAN_MANAGE_TRACK_USERS |
管理测试轨道和修改测试人员列表。 |
CAN_MANAGE_PUBLIC_LISTING |
管理商店发布。 |
CAN_MANAGE_DRAFT_APPS |
修改和删除草稿应用。 |
CAN_MANAGE_ORDERS |
管理订单和订阅。 |
CAN_MANAGE_APP_CONTENT |
管理与政策相关的页面。 |
CAN_VIEW_NON_FINANCIAL_DATA |
查看应用信息(只读)。 |
CAN_VIEW_APP_QUALITY |
查看 Android Vitals、崩溃次数等应用质量数据 |
CAN_MANAGE_DEEPLINKS |
管理应用的深层链接设置。 |
方法 |
|
向用户授予对给定软件包的访问权限。 |
|
移除用户对指定软件包或开发者账号的所有访问权限。 |
|
更新用户对给定软件包的访问权限。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe Grant resource allows you to manage user access to your Google Play Developer account and specific app packages.\u003c/p\u003e\n"],["\u003cp\u003eGrants can be created, updated, and deleted using dedicated methods.\u003c/p\u003e\n"],["\u003cp\u003eAppLevelPermissions define the level of access granted for each app, ranging from read-only to full administrative control.\u003c/p\u003e\n"],["\u003cp\u003ePermissions include managing releases, replying to reviews, viewing financial data, and more.\u003c/p\u003e\n"]]],["A Grant resource manages app access. It has a `name`, `packageName`, and `appLevelPermissions`. AppLevelPermissions define the user's capabilities, such as viewing financial data, managing permissions, replying to reviews, releasing to tracks, managing listings, and more. Core methods include creating a grant to give a user access, deleting to revoke access, and patching to update a user's existing permissions for a package.\n"],null,["# REST Resource: grants\n\n- [Resource: Grant](#Grant)\n - [JSON representation](#Grant.SCHEMA_REPRESENTATION)\n - [AppLevelPermission](#Grant.AppLevelPermission)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Grant\n---------------\n\nAn access grant resource.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"packageName\": string, \"appLevelPermissions\": [ enum (/android-publisher/api-ref/rest/v3/grants#Grant.AppLevelPermission) ] } ``` |\n\n| Fields ||\n|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Resource name for this grant, following the pattern \"developers/{developer}/users/{email}/grants/{packageName}\". If this grant is for a draft app, the app ID will be used in this resource name instead of the package name. |\n| `packageName` | `string` Immutable. The package name of the app. This will be empty for draft apps. |\n| `appLevelPermissions[]` | `enum (`[AppLevelPermission](/android-publisher/api-ref/rest/v3/grants#Grant.AppLevelPermission)`)` The permissions granted to the user for this app. |\n\n### AppLevelPermission\n\nA permission granted at a per-app level.\n\n| Enums ||\n|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `APP_LEVEL_PERMISSION_UNSPECIFIED` | Unknown or unspecified permission. |\n| `CAN_ACCESS_APP` | View app information (read-only). Deprecated: Try defining a more granular capability. Otherwise, check AppLevelPermission.CAN_VIEW_NON_FINANCIAL_DATA. | This item is deprecated! |\n| `CAN_VIEW_FINANCIAL_DATA` | View financial data. |\n| `CAN_MANAGE_PERMISSIONS` | Admin (all permissions). |\n| `CAN_REPLY_TO_REVIEWS` | reviews.reply to reviews. |\n| `CAN_MANAGE_PUBLIC_APKS` | Release to production, exclude devices, and use app signing by Google Play. |\n| `CAN_MANAGE_TRACK_APKS` | Release to testing tracks. |\n| `CAN_MANAGE_TRACK_USERS` | Manage testing tracks and edit tester lists. |\n| `CAN_MANAGE_PUBLIC_LISTING` | Manage store presence. |\n| `CAN_MANAGE_DRAFT_APPS` | Edit and delete draft apps. |\n| `CAN_MANAGE_ORDERS` | Manage orders and subscriptions. |\n| `CAN_MANAGE_APP_CONTENT` | Manage policy related pages. |\n| `CAN_VIEW_NON_FINANCIAL_DATA` | View app information (read-only). |\n| `CAN_VIEW_APP_QUALITY` | View app quality data such as Vitals, Crashes etc. |\n| `CAN_MANAGE_DEEPLINKS` | Manage the deep links setup of an app. |\n\n| Methods ------- ||\n|----------------------------------------------------------------|----------------------------------------------------------------------------|\n| ### [create](/android-publisher/api-ref/rest/v3/grants/create) | Grant access for a user to the given package. |\n| ### [delete](/android-publisher/api-ref/rest/v3/grants/delete) | Removes all access for the user to the given package or developer account. |\n| ### [patch](/android-publisher/api-ref/rest/v3/grants/patch) | Updates access for the user to the given package. |"]]