|
我现在是基于H5使用Open API,通过MAC进行设备绑定,绑定代码如下:
$.ajax({
url: 'http://' + apiHost + '/app/bind_mac',
type: "POST",
contentType: "application/json",
headers: {
"X-Gizwits-Application-Id": gizAppId,
"X-Gizwits-User-token": g._userToken,
"X-Gizwits-Timestamp": timestamp,
"X-Gizwits-Signature": FS.md5(productSecret + timestamp).toLowerCase()
},
dataType: "json",
data: {
product_key: '2d23245**********e18d97696',
mac: 'virtual:site',
remark: true,
dev_alias: 'yf'
},
done: function(result){
console.log(result);
}
});
但是最终一直返回下面结果
- detail_message:"'product_key' is a required property"
- error_code:9015
- error_message:"form_invalid"
|
-
1.png
(19.95 KB, 下载次数: 136)
-
2.png
(37.18 KB, 下载次数: 156)
|