$npx -y skills add hanamizuki/solopreneur --skill gplay-user-managementUser and grant management for Google Play Console via gplay users and gplay grants commands. Use when asked to manage developer account users, account-wide permissions, or per-app access grants.
| 1 | # User & Grant Management |
| 2 | |
| 3 | Manage team members and their permissions in Google Play Console. Two layers: |
| 4 | |
| 5 | - **Users** (`gplay users`) — account-wide members. Permissions here (`*_GLOBAL`, `CAN_SEE_ALL_APPS`) apply across the whole developer account. |
| 6 | - **Grants** (`gplay grants`) — per-app access for a user. Permissions here apply to a single package only. |
| 7 | |
| 8 | Use **users** to add someone to the account (optionally with account-wide powers). Use **grants** to give an existing user access to specific apps without granting account-wide reach. Least privilege: prefer per-app grants over global permissions. |
| 9 | |
| 10 | ## Preconditions |
| 11 | |
| 12 | - Credentials set (`gplay auth login` or `GPLAY_SERVICE_ACCOUNT`). |
| 13 | - Service account needs permission to manage users (`CAN_MANAGE_PERMISSIONS_GLOBAL`). |
| 14 | - **Developer ID** is required for every command. Pass it with `--developer`. Find it in the Play Console URL (`play.google.com/console/u/0/developers/<DEVELOPER_ID>/...`). |
| 15 | |
| 16 | ## Key concepts |
| 17 | |
| 18 | - The flag is `--developer` (Developer ID), **not** `--developer-id`. |
| 19 | - There is **no** `--role` or `--permissions` flag. Permissions are supplied as a JSON body via `--json`. |
| 20 | - `--json` accepts an inline JSON string **or** `@path/to/file.json`. |
| 21 | - Users JSON key: `developerAccountPermissions` (account-wide). Grants JSON key: `appLevelPermissions` (per-app). |
| 22 | - `delete` requires `--confirm` — it is a no-op safety guard, and the deletion is irreversible. |
| 23 | |
| 24 | ## Users (account-wide) |
| 25 | |
| 26 | ```bash |
| 27 | # List users |
| 28 | gplay users list --developer DEVELOPER_ID |
| 29 | gplay users list --developer DEVELOPER_ID --paginate --page-size 50 |
| 30 | gplay users list --developer DEVELOPER_ID --output table |
| 31 | |
| 32 | # Create a user (inline JSON) |
| 33 | gplay users create \ |
| 34 | --developer DEVELOPER_ID \ |
| 35 | --email user@example.com \ |
| 36 | --json '{"developerAccountPermissions":["CAN_SEE_ALL_APPS"]}' |
| 37 | |
| 38 | # Create with an expiration and JSON from a file |
| 39 | gplay users create \ |
| 40 | --developer DEVELOPER_ID \ |
| 41 | --email contractor@example.com \ |
| 42 | --json @perms.json |
| 43 | |
| 44 | # Update a user's account-wide permissions |
| 45 | gplay users update \ |
| 46 | --developer DEVELOPER_ID \ |
| 47 | --email user@example.com \ |
| 48 | --json '{"developerAccountPermissions":["CAN_SEE_ALL_APPS","CAN_VIEW_FINANCIAL_DATA_GLOBAL"]}' |
| 49 | |
| 50 | # Delete a user (requires --confirm) |
| 51 | gplay users delete \ |
| 52 | --developer DEVELOPER_ID \ |
| 53 | --email user@example.com \ |
| 54 | --confirm |
| 55 | ``` |
| 56 | |
| 57 | Users JSON body (`expirationTime` is optional, RFC 3339): |
| 58 | |
| 59 | ```json |
| 60 | { |
| 61 | "developerAccountPermissions": [ |
| 62 | "CAN_SEE_ALL_APPS", |
| 63 | "CAN_VIEW_FINANCIAL_DATA_GLOBAL" |
| 64 | ], |
| 65 | "expirationTime": "2025-12-31T23:59:59Z" |
| 66 | } |
| 67 | ``` |
| 68 | |
| 69 | `update` also accepts `--update-mask` (comma-separated fields) to update only specific fields; if omitted, all fields in the body are applied. |
| 70 | |
| 71 | ### Account-level permissions (users) |
| 72 | |
| 73 | `CAN_SEE_ALL_APPS`, `CAN_VIEW_FINANCIAL_DATA_GLOBAL`, `CAN_MANAGE_PERMISSIONS_GLOBAL`, |
| 74 | `CAN_EDIT_GAMES_GLOBAL`, `CAN_PUBLISH_GAMES_GLOBAL`, `CAN_REPLY_TO_REVIEWS_GLOBAL`, |
| 75 | `CAN_MANAGE_PUBLIC_APKS_GLOBAL`, `CAN_MANAGE_TRACK_APKS_GLOBAL`, `CAN_MANAGE_TRACK_USERS_GLOBAL`, |
| 76 | `CAN_MANAGE_PUBLIC_LISTING_GLOBAL`, `CAN_MANAGE_DRAFT_APPS_GLOBAL`, |
| 77 | `CAN_CREATE_MANAGED_PLAY_APPS_GLOBAL`, `CAN_CHANGE_MANAGED_PLAY_SETTING_GLOBAL`, |
| 78 | `CAN_MANAGE_ORDERS_GLOBAL` |
| 79 | |
| 80 | ## Grants (per-app) |
| 81 | |
| 82 | ```bash |
| 83 | # Grant a user access to one app |
| 84 | gplay grants create \ |
| 85 | --developer DEVELOPER_ID \ |
| 86 | --email user@example.com \ |
| 87 | --package com.example.app \ |
| 88 | --json '{"appLevelPermissions":["CAN_ACCESS_APP","CAN_MANAGE_PUBLIC_APKS"]}' |
| 89 | |
| 90 | # Update an app grant |
| 91 | gplay grants update \ |
| 92 | --developer DEVELOPER_ID \ |
| 93 | --email user@example.com \ |
| 94 | --package com.example.app \ |
| 95 | --json '{"appLevelPermissions":["CAN_ACCESS_APP","CAN_MANAGE_PUBLIC_LISTING"]}' |
| 96 | |
| 97 | # Revoke an app grant (requires --confirm) |
| 98 | gplay grants delete \ |
| 99 | --developer DEVELOPER_ID \ |
| 100 | --email user@example.com \ |
| 101 | --package com.example.app \ |
| 102 | --confirm |
| 103 | ``` |
| 104 | |
| 105 | Grants JSON body: |
| 106 | |
| 107 | ```json |
| 108 | { |
| 109 | "appLevelPermissions": [ |
| 110 | "CAN_ACCESS_APP", |
| 111 | "CAN_MANAGE_PUBLIC_APKS" |
| 112 | ] |
| 113 | } |
| 114 | ``` |
| 115 | |
| 116 | `update` also accepts `--update-mask`. |
| 117 | |
| 118 | ### App-level permissions (grants) |
| 119 | |
| 120 | `CAN_ACCESS_APP` (basic access), `CAN_VIEW_FINANCIAL_DATA`, `CAN_MANAGE_PERMISSIONS`, |
| 121 | `CAN_REPLY_TO_REVIEWS`, `CAN_MANAGE_PUBLIC_APKS` (production releases), |
| 122 | `CAN_MANAGE_TRACK_APKS` (test tracks), `CAN_MANAGE_TRACK_USERS` (testers), |
| 123 | `CAN_MANAGE_PUBLIC_LISTING`, `CAN_MANAGE_DRAFT_APPS`, `CAN_MANAGE_ORDERS` |
| 124 | |
| 125 | ## Permission recipes |
| 126 | |
| 127 | Build the JSON body from the constants above. `CAN_ACCESS_APP` is the base for any app grant. |
| 128 | |
| 129 | **Read-only viewer (per app):** |
| 130 | ```json |
| 131 | {"appLevelPermissions":["CAN_ACCESS_APP"]} |
| 132 | ``` |
| 133 | |
| 134 | **Release manager (per app):** |
| 135 | ```json |
| 136 | {"appLevelPermissions":["CAN_ACCESS_APP","CAN_MANAGE_PUBLIC_APKS","CAN_MANAGE_TRACK_APKS","CAN_MANAGE_TRACK_USERS","CAN_MANAGE_DRAFT_APPS"]} |
| 137 | ``` |
| 138 | |
| 139 | **Finance (per app):** |
| 140 | ```json |
| 141 | {"appLevelPermissions |