ISV通过该接口获取天猫精灵IoT设备支持控制或查询的语料
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
user_open_id | String | 可选 | sgC2EnQn764Fb3dndkPm+Sih/tt/CUeplOyC1w6yAeGXeauSgEtPyGhmXPQiVJXRfFGPWb4K8PNXxq2slxxxxx== | 天猫精灵开放用户id | |
client_id | String | 可选 | Vz0MZRvyjPWqF1rNHxxxxx | 天猫精灵开放的client id | |
dev_id | String | 可选 | 780f778xxxxx | iot设备id |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ret_values | DeviceCorpusTopDto [] | 返回结构体 | |
|
1 2 3 4 5 6 7 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaIotDeviceCorpusGetRequest req = new AlibabaIotDeviceCorpusGetRequest(); req.setUserOpenId( "sgC2EnQn764Fb3dndkPm+Sih/tt/CUeplOyC1w6yAeGXeauSgEtPyGhmXPQiVJXRfFGPWb4K8PNXxq2slxxxxx==" ); req.setClientId( "Vz0MZRvyjPWqF1rNHxxxxx" ); req.setDevId( "780f778xxxxx" ); AlibabaIotDeviceCorpusGetResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 | < alibaba_iot_device_corpus_get_response > < ret_values > < device_corpus_top_dto > < corpus_list > < string >["打开灯"</ string > < string >"关闭灯"]</ string > </ corpus_list > < function_name >开关</ function_name > </ device_corpus_top_dto > </ ret_values > </ alibaba_iot_device_corpus_get_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|