tuya-connector-nodejs icon indicating copy to clipboard operation
tuya-connector-nodejs copied to clipboard

Always got sign invalid

Open ffadiuvat opened this issue 3 years ago • 3 comments

I tried to send a api call witht his sdk, i provide correcte secret and access key. but it always return an sign invalid error. Here the example of the code

const result = await client.request({
    method: 'post',
    path: `/v1.0/iot-03/devices/${deviceID}/commands`,
    body: {
      device_id: deviceID,
      commands: [{
        code: 'switch_led',
        value: value,
      }]
    }
  });

ffadiuvat avatar Aug 31 '22 16:08 ffadiuvat

I have the same problem, Tuya support was of not much help. Did you manage to find out the answer?

juanrgh avatar Oct 12 '22 15:10 juanrgh

I had the same problem. It was giving me a 1106 permission deny error. I found that if I removed /iot-03 from the path it works.

mjpoo avatar Nov 04 '22 09:11 mjpoo

I have found same error like it always return an sign invalid error.

const response = await tuya.request({ method: 'POST', path: '/v1.0/iot-03/users/login', headers: { // 'Content-Type': 'application/json', 'client_id': tuyaClientId, 'sign': signature, 'sign_method': 'HMAC-SHA256', 't': t }, body: body, });

sedhalsoni avatar Aug 03 '24 04:08 sedhalsoni