当你在控制台成功申请 license 后,你需要对 liense 进行激活。你可以在控制台上进行激活,也可以通过 OpenAPI 实现激活操作。
你可以使用 ActivateLicense 这个 OpenAPI 实现这一功能。

接口行为

你可以使用 ActivateLicense 接口,激活 license。

使用此接口激活 License 的效果和在控制台上手动激活一致。

前提条件

你必须已在控制台上申请了 License。

调用接口

关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用OpenAPI。

请求方式

使用 POST 方式发起请求。

请求参数

以下是接口特有的请求参数。关于其他公共请求参数,参看请求参数。

Query
参数名类型必填示例值描述
Actionstring是ActivateLicense接口名称,本接口取值:ActivateLicense
Versionstring是2020-12-01接口版本,本接口取值:2020-12-01
Body
参数名类型必填示例值描述
AppIdstring否Your_AppId应用的唯一标志
Typestring是release申请证书类型。
  • relases: 正式版
  • test: 测试版
  • DeviceIdstring是Your_DeviceId设备的唯一标识。
    DeviceTypestring是client设备类型。
  • client:客户端
  • server:服务端
  • 返回参数
    参数名类型示例值描述
    LicenseUrlstringhttp://xxxx.xxx.licenselicense 文件下载地址
    LicensestringYour_License将License 原始信息进行 base64 编码后的结果。关于 License 原始信息,参看License 原始信息。

    License 原始信息

    参数名类型示例值描述
    AppIdstringYour_AppId应用的唯一标志
    CredentialstringYour_Credential证书权限加密串
    SignaturestringYour_Signature加密签名
    请求示例代码
    Query
    https://rtc.volcengineapi.com?Action=ActivateLicense&Version=2020-12-01
    
    postscript
    Body
    {
        "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