当你在控制台成功申请 license 后,你需要对 liense 进行激活。你可以在控制台上进行激活,也可以通过 OpenAPI 实现激活操作。
你可以使用 ActivateLicense 这个 OpenAPI 实现这一功能。
你可以使用 ActivateLicense 接口,激活 license。
使用此接口激活 License 的效果和在控制台上手动激活一致。
你必须已在控制台上申请了 License。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用OpenAPI。
使用 POST 方式发起请求。
以下是接口特有的请求参数。关于其他公共请求参数,参看请求参数。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | string | 是 | ActivateLicense | 接口名称,本接口取值:ActivateLicense |
| Version | string | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | string | 否 | Your_AppId | 应用的唯一标志 |
| Type | string | 是 | release | 申请证书类型。relases: 正式版test: 测试版 |
| DeviceId | string | 是 | Your_DeviceId | 设备的唯一标识。 |
| DeviceType | string | 是 | client | 设备类型。client:客户端server:服务端 |
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| LicenseUrl | string | http://xxxx.xxx.license | license 文件下载地址 |
| License | string | Your_License | 将License 原始信息进行 base64 编码后的结果。关于 License 原始信息,参看License 原始信息。 |
License 原始信息
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| AppId | string | Your_AppId | 应用的唯一标志 |
| Credential | string | Your_Credential | 证书权限加密串 |
| Signature | string | Your_Signature | 加密签名 |
https://rtc.volcengineapi.com?Action=ActivateLicense&Version=2020-12-01
postscript{
"AppId" : "Your_AppId",
"Type":"release",
"DeviceId" : "Your_DeviceId",
"Token" : "Your_Token",
"DeviceType":"Your_DeviceType"
}
json{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "ActivateLicense",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result":{
"LicenseUrl": "http://xxxx.xxx.license",
"License": "Your_License"
}
}
json