$ npm install --global @createitv/agc-cli && agc versionMove every release through one red line.
A Go command center for discovering, dry-running, and invoking AppGallery Connect APIs—with stable JSON for people, CI, and coding agents.
$ agc auth check --pretty
{
"data": {
"name": "production",
"mode": "service-account",
"active": true
},
"affordances": {
"next": "agc publishing endpoints"
}
}project profile resolved · dry-run on
Install agc CLI
Use the package manager for your system.
Use NPM for one unattended command across Windows, macOS, and Linux CI. Native Homebrew and Scoop packages remain available for developer workstations.
$ brew tap createitv/tap && brew install agc-cli && agc versionPS> if (!(Get-Command scoop -ErrorAction SilentlyContinue)) { Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; irm get.scoop.sh | iex }; scoop bucket add createitv https://github.com/Createitv/scoop-bucket; scoop install agc-cli; agc versionAgent Skills
Give your coding agent a map of AppGallery Connect.
Six portable Skills follow the task-oriented asc-cli pattern. Install all of them, choose one workflow, inspect the source, or contribute improvements through GitHub.
Contribute a Skill$ agc skills install --agent codex --globalagc-cli-usageGeneral command discovery, dry-run review, authorized execution, and remote verification.
agc skills install --name agc-cli-usage --agent codex --globalagc-authCredential profiles, whoami, OAuth team lookup, and authorization diagnosis.
agc skills install --name agc-auth --agent codex --globalagc-publishingMetadata, packages, review submission, staged rollout, and release-state verification.
agc skills install --name agc-publishing --agent codex --globalagc-testingTest versions, groups, testers, invitation links, feedback, and promotion.
agc skills install --name agc-testing --agent codex --globalagc-reportsDistribution, install, revenue, retention, and HarmonyOS service report exports.
agc skills install --name agc-reports --agent codex --globalagc-cicdPinned cross-platform installation, protected credentials, dry-run gates, and CI verification.
agc skills install --name agc-cicd --agent codex --globalThe release rail
Context flows forward. Secrets do not.
Each stage owns one job. Credentials remain local, project context remains portable, and destructive API calls require an explicit switch.
AUTH
PS256 / OAuth
PROFILE
project-bound
PACKAGE
upload + status
RELEASE
invoke by choice
Automatic profile binding
Choose once per project. Override only when you mean it.
Bind production in .agc/project.json. Commands resolve the profile in a predictable order, while --profile staging remains available for one-off work.
- 1CLI override
--profile staging - 2Project default
.agc/project.json - 3Active account
~/.agc/credentials.json
{
"appId": "123456789",
"projectId": "987654321",
"packageName": "com.example.app",
"profile": "production"
}Interface registry
Discover the API before writing the request.
Every entry carries its method, path, parameter locations, CLI command, REST route, and dry-run path.
Selected family / cloud-auth
Cloud Authentication
Application user sign-in and server user management; separate credential branches.
agc cloud-auth endpoints --output tableagc cloud-auth status --pretty/api/v1/cloud-authAll endpoints 17
Expand an endpoint for registered parameters and commands. Consult its reference for full schemas, responses, and permissions.
POST导入用户import-users/api/auth-service/v1/server/user:import
此接口用于将准备好的用户信息导入到认证服务的用户数据中。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
productId | header | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${JWT}”。JWT为通过Service Account方式获取授权中获取的鉴权令牌。 |
client_id | header | No | string | 客户端ID,获取方法参考创建API客户端。 |
users | body | Yes | array | 第三方的认证信息。 |
Request body: users
Inspect definition
agc cloud-auth import-users --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/import-users
Dry run (supply required parameters first)
agc cloud-auth import-users --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST导出用户export-users/api/auth-service/v1/server/user:export
此接口用于导出认证服务中的用户信息。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
productId | header | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${JWT}”。JWT为通过Service Account方式获取授权中获取的鉴权令牌。 |
client_id | header | No | string | 客户端ID,获取方法参考创建API客户端。 |
block | body | No | — | 当前存储块号。不填默认是0。第1次调用时,block设置为0。服务端会返回totalBlock。后面采用循环调用,遍历导出block块里面的用户。 Documented String/example integer conflict; accepted without coercion. |
Request body: block
Inspect definition
agc cloud-auth export-users --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/export-users
Dry run (supply required parameters first)
agc cloud-auth export-users --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
GET验证用户凭据verify-token/api/oauth2/third/v1/verify-token
此接口用于验证已经颁发的用户凭据并且检查用户凭据是否已经撤销。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
accessToken | header | Yes | string | 用户凭据。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${JWT}”。JWT为通过Service Account方式获取授权中获取的鉴权令牌。 |
client_id | header | No | string | 客户端ID,获取方法参考创建API客户端。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
Inspect definition
agc cloud-auth verify-token --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/verify-token
Dry run (supply required parameters first)
agc cloud-auth verify-token --invoke --dry-run=trueRead endpoint reference ↗
POST撤销用户凭据revoke-token/api/oauth2/third/v1/revoke-token
此接口用于撤销已经颁发的用户访问凭据。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
uid | header | Yes | string | 待撤销凭据的用户。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${JWT}”。JWT为通过Service Account方式获取授权中获取的鉴权令牌。 |
client_id | header | No | string | 客户端ID,获取方法参考创建API客户端。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
Request body: json
Inspect definition
agc cloud-auth revoke-token --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/revoke-token
Dry run (supply required parameters first)
agc cloud-auth revoke-token --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST获取Tokenclient-token/agc/apigw/oauth2/v1/token
在使用客户端REST API调用业务接口前,需要通过华为开放平台进行鉴权,并获取认证通过后的Token。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
useJwt | body | Yes | integer | 是否使用自有账号凭据JWT(Json Web Token): 1:使用JWT。 0:不使用,默认为0。 |
grant_type | body | Yes | string | 固定传入“client_credentials”。 |
client_id | body | Yes | string | 客户端ID,即获取客户端API授权中的“Client ID”。 |
client_secret | body | Yes | string | 客户端密钥,即获取客户端API授权中的“Client Secret”。 |
Request body: useJwt,grant_type,client_id,client_secret
Inspect definition
agc cloud-auth client-token --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/client-token
Dry run (supply required parameters first)
agc cloud-auth client-token --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST验证码申请request-code/agc/apigw/oauth2/third/v1/verify-code
此接口用于用户注册、登录或者重置密码时验证码申请。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
phone | body | No | string | 手机号。需包含国家码,以“+”开头,国家码和手机号之间以“-”连接,例如中国大陆手机号“+86-150xxxxxxxx”。 |
email | body | No | string | 电子邮箱。 电子邮箱和手机号码二者必填一个。 |
action | body | No | integer | 验证码行为,取值如下: 1001:注册登录时申请验证码。 1002:重置密码时申请验证码。 |
lang | body | No | string | 语言,格式为“zh_CN”。所有支持的语言类型请参考认证服务验证码语言类型。 |
sendInterval | body | No | integer | 验证码发送间隔,30s到120s之间。 |
Request body: phone,email,action,lang,sendInterval
Inspect definition
agc cloud-auth request-code --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/request-code
Dry run (supply required parameters first)
agc cloud-auth request-code --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST用户注册register/agc/apigw/oauth2/third/v1/user-register
此接口用于用户注册。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
phone | body | No | string | 手机号,包括国家码,以“+”开头,例如中国大陆的手机号以“+86”开头。 |
email | body | No | string | 电子邮箱。 电子邮箱和手机号码二者必填一个。 |
verifyCode | body | No | string | 验证码,传入手机号时必填。 |
password | body | No | string | 登录密码。 |
useJwt | body | No | integer | 是否使用自有账号凭据JWT(Json Web Token): 0:不使用,默认为0。 1:使用。 |
channelId | body | No | string | 渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。 |
aaId | body | No | string | 应用实例唯一编号。 |
Request body: phone,email,verifyCode,password,useJwt,channelId,aaId
Inspect definition
agc cloud-auth register --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/register
Dry run (supply required parameters first)
agc cloud-auth register --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST用户密码登录sign-in-password/agc/apigw/oauth2/third/v1/user-signin
此接口用于用户使用密码登录。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | Yes | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
token | body | Yes | string | 手机号码或者邮箱账号。 |
extraData | body | No | string | 扩展字段,此处用于密码登录时填写密码,填写样例如 {\"password\":\"xxxxxxxxx\"}。 |
autoCreateUser | body | No | integer | 是否自动创建用户,仅用于非托管账号: 0:不自动创建。 1:自动创建,默认为1。 |
useJwt | body | No | integer | 是否使用自有账号凭据JWT(Json Web Token): 0:不使用,默认为0。 1:使用。 |
channelId | body | No | string | 渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。 |
aaId | body | No | string | 应用实例唯一编号。 |
Request body: provider,token,extraData,autoCreateUser,useJwt,channelId,aaId
Inspect definition
agc cloud-auth sign-in-password --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/sign-in-password
Dry run (supply required parameters first)
agc cloud-auth sign-in-password --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST用户验证码登录sign-in-code/agc/apigw/oauth2/third/v1/user-signin
此接口用于用户使用验证码登录。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | Yes | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
token | body | Yes | string | 手机号码或者邮箱账号。 |
extraData | body | No | string | 扩展字段,此处用于验证码登录时填写验证码,填写样例如 {\"verifyCode\":\"123456\"}。 |
autoCreateUser | body | No | integer | 是否自动创建用户,仅用于非托管账号: 1:自动创建,默认为1。 0:不自动创建。 |
useJwt | body | No | integer | 是否使用自有账号凭据JWT(Json Web Token): 0:不使用,默认为0。 1:使用。 |
channelId | body | No | string | 渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。 |
aaId | body | No | string | 应用实例唯一编号。 |
Request body: provider,token,extraData,autoCreateUser,useJwt,channelId,aaId
Inspect definition
agc cloud-auth sign-in-code --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/sign-in-code
Dry run (supply required parameters first)
agc cloud-auth sign-in-code --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
PUT修改手机号或邮箱地址update-account/agc/apigw/oauth2/third/v1/user-phone-email
此接口用于用户修改手机号码或者邮箱地址。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
access_token | header | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
lang | body | No | string | 语言,格式为“zh_CN”。 |
newPhone | body | No | string | 新手机号。 |
newEmail | body | No | string | 新邮箱地址。 新邮箱地址和新手机号必填一个且只能填一个,即一次只修改手机号或者只修改邮箱地址。 |
newVerifyCode | body | Yes | string | 新验证码。 |
Request body: lang,newPhone,newEmail,newVerifyCode
Inspect definition
agc cloud-auth update-account --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/update-account
Dry run (supply required parameters first)
agc cloud-auth update-account --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST重置密码reset-password/agc/apigw/oauth2/third/v1/reset-password
此接口用于用户进行密码重置。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | No | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
account | body | No | string | 用户手机账号或者邮箱账号。 |
verifyCode | body | No | string | 验证码。 |
password | body | No | string | 新密码。 |
Request body: provider,account,verifyCode,password
Inspect definition
agc cloud-auth reset-password --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/reset-password
Dry run (supply required parameters first)
agc cloud-auth reset-password --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
PUT修改密码update-password/agc/apigw/oauth2/third/v1/user-password
此接口用于用户进行密码修改。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
access_token | header | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | No | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
verifyCode | body | No | string | 验证码。 |
newPassword | body | Yes | string | 新密码。 |
Request body: provider,verifyCode,newPassword
Inspect definition
agc cloud-auth update-password --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/update-password
Dry run (supply required parameters first)
agc cloud-auth update-password --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST用户关联link-user/agc/apigw/oauth2/third/v1/user-link
此接口用于用户进行账号关联操作。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
access_token | header | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | Yes | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
token | body | Yes | string | 手机号码或者邮箱账号。 |
extraData | body | No | string | 扩展字段,此处用于账号关联时填写密码,填写样例如{\"password\":\"xxxxxxxxx\"}。 |
autoCreateUser | body | No | integer | 是否自动创建用户,仅用于非托管账号: 1:自动创建,默认为1。 0:不自动创建。 |
useJwt | body | No | integer | 是否使用自有账号凭据JWT(Json Web Token): 0:不使用,默认为0。 1:使用。 |
channelId | body | No | string | 渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。 |
aaId | body | No | string | 应用实例唯一编号。 |
Request body: provider,token,extraData,autoCreateUser,useJwt,channelId,aaId
Inspect definition
agc cloud-auth link-user --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/link-user
Dry run (supply required parameters first)
agc cloud-auth link-user --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST取消关联unlink-user/agc/apigw/oauth2/third/v1/user-unlink
此接口用于用户取消账号关联。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
access_token | header | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | query | Yes | integer | 需要取消关联的provider认证方式。 |
Request body: json
Inspect definition
agc cloud-auth unlink-user --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/unlink-user
Dry run (supply required parameters first)
agc cloud-auth unlink-user --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST登出sign-out/agc/apigw/oauth2/third/v1/user-signout
此接口用于用户进行登出操作。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
refreshToken | body | Yes | string | 用于刷新accessToken。当accessToken过期后,需要使用refreshToken去获取新的accessToken。 |
accessToken | body | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
Request body: refreshToken,accessToken
Inspect definition
agc cloud-auth sign-out --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/sign-out
Dry run (supply required parameters first)
agc cloud-auth sign-out --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST注销delete-user/agc/apigw/oauth2/third/v1/user-delete
此接口用于用户进行账号注销操作。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
access_token | header | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
Request body: json
Inspect definition
agc cloud-auth delete-user --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/delete-user
Dry run (supply required parameters first)
agc cloud-auth delete-user --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POST账号重认证reauthenticate/agc/apigw/oauth2/third/v1/user-reauthenticate
此接口用于用户进行账号重认证操作。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。 |
access_token | header | Yes | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | Yes | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
token | body | Yes | string | 手机号码或者邮箱账号。 |
extraData | body | No | string | 扩展字段,此处用于账号重认证时填写密码,填写样例如{\"password\":\"xxxxxxxxx\"}。 |
autoCreateUser | body | No | integer | 是否自动创建用户,仅用于非托管账号: 0:不自动创建。 1:自动创建,默认为1。 |
useJwt | body | No | integer | 是否使用自有账号凭据JWT(Json Web Token): 0:不使用,默认为0。 1:使用。 |
channelId | body | No | string | 渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。 |
aaId | body | No | string | 应用实例唯一编号。 |
Request body: provider,token,extraData,autoCreateUser,useJwt,channelId,aaId
Inspect definition
agc cloud-auth reauthenticate --pretty
Local REST definition
/api/v1/cloud-auth/endpoints/reauthenticate
Dry run (supply required parameters first)
agc cloud-auth reauthenticate --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
What is agc-cli, and who is it for?
agc-cli is an open-source Go command-line tool for Huawei AppGallery Connect, maintained by Createitv. Its installed command is agc. It organizes API discovery, credential profiles, request previews, and API invocation into reusable commands for HarmonyOS and Huawei app developers who manage app metadata, testers, products, and reports.
Project and guides: GitHub · Usage guide · Issues
GEO · AEO · LLMO
Agent-readable documentation
These public files expose project facts, task selection, safety boundaries, Skills, and endpoint contracts without requiring JavaScript, authentication, or page-structure guessing.
A complete path from task selection and auth checks to dry runs and result verification.
/agent-guide.en.mdSkills indexSix task-oriented Skills with use cases, install commands, and source links.
/skills.mdFull AI contextA single-file project briefing, command boundaries, and resource index for LLMs.
/llms-full.txtAPI contract JSONMethods, paths, parameters, and official references for all 156 registered endpoints.
/api-reference.jsonFrequently asked questions
Is agc-cli an official Huawei tool?
No. agc-cli is an independent open-source project maintained by Createitv under the MIT license. It organizes endpoints using Huawei AppGallery Connect API references and is not an official Huawei product or support service.
How do I install agc-cli on macOS, Windows, or Linux?
With Node.js 18+, all three systems can run npm install --global @createitv/agc-cli. Homebrew remains available on macOS and Scoop on Windows. Run agc version to verify installation.
Is agc-cli free, and do I need an account?
agc-cli is free to use and modify under the MIT license. Calling Huawei APIs requires your own AppGallery Connect account, credentials, and permissions. Huawei service pricing and limits remain subject to Huawei terms. Browsing the endpoint reference or inspecting CLI definitions does not require login.
How do I query app information for the first time?
Save credentials with agc auth login --service-account-file ~/.agc/service-account.json --name production, then bind the project with agc init --app-id YOUR_APP_ID --default-profile production. Preview with agc publishing app-info-query --invoke --query appId=YOUR_APP_ID --query lang=en-US. Add --dry-run=false after checking the request. Supply a client_id header explicitly when required.
Are all 156 endpoints production-verified?
No. The registry contains 156 entries across 13 API families; this is registry coverage, not production verification of every endpoint. Registered parameters and command surfaces are shown here. Consult each endpoint reference for full request and response schemas, permissions, and business prerequisites.
Does the default dry run change my app?
No. Endpoint commands with --invoke preview the request without sending it by default. Real invocation requires --dry-run=false. Check the target app, credential profile, and parameters before executing.
Can I use agc-cli with scripts or AI agents?
Yes. JSON output supports script processing. agc capabilities and agc endpoints expose discovery; agc web-server provides local REST routes, and agc openapi exports the contract. Command templates support navigation but do not replace business-state checks or review decisions.
How do I install the agc-cli Skills for Codex or Claude?
Install agc-cli, then run agc skills list to browse the six task-oriented Skills. Run agc skills install --agent codex --global for all Skills, or add --name agc-publishing for only the publishing Skill. Individual SKILL.md files are also downloadable from the website.
Does a project profile fill all endpoint parameters automatically?
A project configuration can select its default credential profile, with --profile for explicit overrides. App IDs, languages, headers, and request bodies still need to be supplied according to each endpoint. Keep Service Account private keys and credential files out of Git.
Browse the complete API reference by family
Content updated:
Quick start
Three commands to a bound, inspectable workspace.
Use placeholders for your AppGallery Connect values. The second command is what makes the profile automatic for this project.
Save a credential profile
Service Account is the preferred route. Secrets stay in ~/.agc/credentials.json with restricted permissions.
$ agc auth login --service-account-file ~/.agc/service-account.json --name productionBind it to the project
Save project metadata and choose a default credential profile. Supply endpoint parameters explicitly when invoking APIs.
$ agc init --app-id <app-id> --project-id <project-id> --package-name com.example.app --default-profile productionInspect before invoking
Endpoint commands are dry-run first. Review the exact method and URL, then opt into the real request.
$ agc publishing app-info-query --invoke --query appId=<app-id> --dry-run=falseLocal command center
The browser is a window into the same registry.
Start the local REST server when you want live capability data. Without it, this site stays useful as a complete reference surface.
agc web-server --addr :8421/api/v1/capabilitiesfamilies + affordances/api/v1/endpointsall interface entries/api/v1/openapi.jsonmachine-readable contract/api/v1/:family/endpoints/:id/invokedry-run by default