有奖捉虫:行业应用 & 管理与支持文档专题 HOT

1. 接口描述

接口请求域名:iot.cloud.tencent.com/api/exploreropen/tokenapi 本接口(AppCreateProductResource)用于上传后创建(登记)文件。

2. 输入参数

名称
类型
必选
描述
AccessToken
String
公共参数,用户通过微信号、手机或邮箱账号登录成功后,获取的访问 Token。
RequestId
String
公共参数,唯一请求 ID,可自行生成,推荐使用 uuId。定位问题时,需提供该次请求的 RequestId。
Action
String
AppCreateProductResource。
ProductId
String
产品 ID。
UserResourceName
String
用户侧的文件名称。
FileSize
Int
文件的文件字节大小。
ResourceVer
String
文件的版本。
FileHash
String
文件的 hash 值。

3. 输出参数

名称
类型
描述
RequestId
String
公共参数,唯一请求 ID,与入参相同。
ResourceName
String
厂商侧的文件名称。

4. 示例

示例1

输入示例
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1
content-type: application/json
{
"RequestId": "1pZb3sz1N",
"Action": "AppCreateProductResource",
"ProductId": "BKTTNGIQOG",
"UserResourceName": "restest",
"ResourceVer": "0.0.1",
"FileHash": "2a8116bfda285cecd77562decd99cc0f",
"FileSize": 5179,
"AccessToken": "8b4a70dd16105f******************18edd4e78a3bb8ec"
}
输出示例: 成功
{"Response":
{"ResourceName": "USER_72375312314273792_RES_restest",
"RequestId": "1pZb3sz1N"}}

5. 错误码

错误码
描述
InternalError
内部错误。
InvalidParameterValue
参数取值错误。
InvalidParameterValue.InvalidAccessToken
Token 无效。