Documentation Index
Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt
Use this file to discover all available pages before exploring further.
【私有】登录
登录订阅格式
请求格式
API_KEY: 为用户申请的APIKeytimestamp: 为时间戳, 单位是毫秒, 超过 60 秒后会过期sign: 为签名, sign=CryptoJS.HmacSHA256(timestamp + ”#” + your_api_memo + ”#” + “wooxpro.WebSocket”, your_api_secret_key)dev: 为设备, 比如web
示例
登录示例
返回
- 当前时间:timestamp=1589267764859
- 申请的API_KEY = “80618e45710812162b04892c7ee5ead4a3cc3e56”
- 申请的API_SECRET = “6c6c98544461bbe71db2bca4c6d7fd0021e0ba9efc215f9c6ad41852df9d9df9”
- 申请的API_MEMO = “test001”;
sign:
sign = CryptoJS.HmacSHA256(1589267764859 + "#" + test001 + "#" + "wooxpro.WebSocket", '6c6c98544461bbe71db2bca4c6d7fd0021e0ba9efc215f9c6ad41852df9d9df9')
= 3ceeb7e1b8cb165a975e28a2e2dfaca4d30b358873c0351c1a071d8c83314556
使用 Shell 生成签名 sign:
sign = echo -n '1589267764859#test001#wooxpro.WebSocket' | openssl dgst -sha256 -hmac "6c6c98544461bbe71db2bca4c6d7fd0021e0ba9efc215f9c6ad41852df9d9df9"
(stdin)= 3ceeb7e1b8cb165a975e28a2e2dfaca4d30b358873c0351c1a071d8c83314556
最终的登录参数如下:
{"action": "access", "args": ["80618e45710812162b04892c7ee5ead4a3cc3e56", "1589267764859", "3ceeb7e1b8cb165a975e28a2e2dfaca4d30b358873c0351c1a071d8c83314556", "web"]}