Search found 11 matches

by panda-cat
2024年 Apr 18日 10:10
Forum: 云开发
Topic: 设备连接求助
Replies: 5
Views: 539

Re: 设备连接求助

96631529fb2111eeba765ed3ad93e519 的报错应该是参数错误,请确认输入的账号是否存在,且使用对应密码可以正常登录所授权的app。

by panda-cat
2024年 Apr 18日 09:49
Forum: 云开发
Topic: 设备连接求助
Replies: 5
Views: 539

Re: 设备连接求助

😅抱歉这么晚才看到您提的新问题,根据报错请求使用的接口判断当前您正在使用授权码模式授权登录场景,这个场景比较特殊,无法使用tuya-connector-python做接入,需要您自己code来完成接口接入,验签部分建议使用openapi.py内_calculate_sign方法来处理。96631529fb2111eeba765ed3ad93e519 这个报错的原因我具体分析下后再回复您。

by panda-cat
2024年 Apr 15日 13:49
Forum: 云开发
Topic: 设备连接求助
Replies: 5
Views: 539

Re: 设备连接求助

验证了一下你提供的python脚本,signstr内的Content-SHA256不正确,singstr内容应该是:POST\n13f0f1d055453515abe85aa6a09e20bf73d32f14377b72907c04ee4a585b5b76\n\n/v1.0/devices/6cb0efdfcfd228ef8baai2/commands 建议使用sdk对接:https://github.com/tuya/tuya-connector-python sign计算参考脚本如下(请查看SDK内的openapi.py文件): def _calculate_sign( self, met...
by panda-cat
2024年 Apr 15日 11:16
Forum: 云开发
Topic: 设备连接求助
Replies: 5
Views: 539

Re: 设备连接求助

看报错信息是时间戳过期,应该是参数构建中有使用到时间戳与当前时间差距过大。错误码信息:“1013 request time is invalid 请求时间戳过期 请检查请求的时间戳是否已过期,或与当前时间差距过大,可参考 请求结构”(https://developer.tuya.com/cn/docs/iot/ ... 9ruxx88swc)。建议直接使用涂鸦提供的sdk进行对接,避免各种参数构造问题:https://developer.tuya.com/cn/docs/iot/ ... 09frvx48db

by panda-cat
2023年 Dec 27日 10:26
Forum: Developer Platform
Topic: Get all devices as list
Replies: 5
Views: 1687

Re: Get all devices as list

After checking the request code you provided, I found that a required parameter is missing. Supports obtaining the device list and corresponding device status information through the application (schema), product (product_id) or device ID (device_ids) dimensions. Please select the required parameter...
by panda-cat
2023年 Dec 27日 09:46
Forum: Developer Platform
Topic: Get all devices as list
Replies: 5
Views: 1687

Re: Get all devices as list

Hi, please post the request parameters without a key and the detailed return result information for easy analysis. :) :)

by panda-cat
2023年 Dec 15日 14:33
Forum: Cloud/SaaS Development
Topic: Cannot get sign authorized in browser with vanilla JS
Replies: 3
Views: 1348

Re: Cannot get sign authorized in browser with vanilla JS

hi, after checking your script, I found that the contentHash processing is incorrect. It should be SHA256, not HmacSHA256. Please check: https://developer.tuya.com/en/docs/iot/ ... 5g#title-4 -Content-SHA256

by panda-cat
2023年 Nov 30日 20:59
Forum: Cloud/SaaS Development
Topic: Tuya API Stuck at 1004 Invalid sign
Replies: 3
Views: 1290

Re: Tuya API Stuck at 1004 Invalid sign

hi, you can send me the code you requested. In addition, I see that the request result you posted earlier was a long time ago. Can you try the request again and see the result? :geek: :geek: :geek:

by panda-cat
2023年 Oct 31日 16:24
Forum: Cloud/SaaS Development
Topic: code "1004", msg "sign invalid"
Replies: 4
Views: 2175

Re: code "1004", msg "sign invalid"

I found that your pre-scripte is incomplete. You can re-download a postman collection file and import it into postman. The complete information parameters are as follows: (function () { var timestamp = getTime(); pm.environment.set("timestamp",timestamp); const clientId = pm.environment.ge...