| 承载协议 | HTTPS POST |
|---|---|
| 接口方向 | 开发者服务器 -> 华为服务器 |
| 接口URL | https://connect-api.cloud.huawei.com/api/app-test/v1/invitation-code |
| 数据格式 | 请求:Content-Type: application/json 响应:Content-Type: application/json |
Service Account方式:
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| Authorization | M | String | 认证信息,格式为“Authorization: Bearer ${JWT}”。JWT为通过Service Account方式获取授权中获取的鉴权令牌。 |
| appId | M | String(32) | 应用ID,获取方法参考查看应用信息。 |
API客户端方式:
请求Body中使用JSON格式携带邀请码信息,参数如下表所示。
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| groupId | M | String(32) | 测试群组ID。 |
| invitationCodeValidDays | M | Integer(32) | 邀请码有效期。 单位:天 邀请码仅支持30天有效。 |
| invitationCodeInviteLimit | M | Integer(32) | 邀请码可邀请人数上限。 最大值10000。 |
POST /api/app-test/v1/invitation-code HTTP/1.1
Host: connect-api.cloud.huawei.com
client_id: 4141******68
Content-Type: application/json
Authorization: Bearer *******
appId: 6917********65
{
"groupId": "76********08",
"invitationCodeValidDays": 7,
"invitationCodeInviteLimit": 1000
}