合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
| 承载协议 | 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方式、API客户端方式和OAuth客户端方式,区别请参见获取服务端授权。
Service Account方式:
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| Authorization | M | String | 认证信息,格式为“Authorization: Bearer ${JWT}”。JWT为通过Service Account方式获取授权中获取的鉴权令牌。 |
| appId | M | String(32) | 应用ID,获取方法参考查看应用信息。 |
API客户端方式:
OAuth客户端方式:
请求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
- }
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| rtnCode | M | String | 返回码。 取值范围:
|
| rtnDesc | O | String | 返回码描述信息。 |
| businessCode | O | String | 业务错误码。 取值范围:
|
| invitationCode | O | String | 邀请码。 |
| invitationCodeId | O | String | 邀请码ID。 |
- {
- "rtnCode": 0,
- "rtnDesc": "success",
- "businessCode": 0,
- "invitationCode": "1f******ll",
- "invitationCodeId": "2697**********43"
- }