Closed jj-theInvincible closed 3 years ago
This code says Invalid token:
let deviceIdArray = ["someid","someOtherId"] let deviceList = deviceIdArray.join() let statusResponse= await tuya.request({ path: `/v1.0/iot-03/devices/status`, method: 'GET', query:{ device_ids: deviceList });
And this one works:
let deviceIdArray = ["someid","someOtherId"] let deviceList = deviceIdArray.join() let statusResponse= await tuya.request({ path: `/v1.0/iot-03/devices/status?device_ids=${deviceList}`, method: 'GET', });`
Ideally, both imply same things, but looks like the query formation has some issue, using v2.0.2
Are you sure the second one will work properly?
you can upgrade to v2.0.6, the path parse err will be fixed.
This code says Invalid token:
And this one works:
Ideally, both imply same things, but looks like the query formation has some issue, using v2.0.2