Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API permission package error. #17

Open
vedmant opened this issue Jun 27, 2024 · 2 comments
Open

API permission package error. #17

vedmant opened this issue Jun 27, 2024 · 2 comments

Comments

@vedmant
Copy link

vedmant commented Jun 27, 2024

I'm following this documentation https://developer.tuya.com/en/docs/iot/device-control-best-practice-nodejs?id=Kaunfr776vomb

my code is as in the example:

const { TuyaContext } = require('@tuya/tuya-connector-nodejs')

const context = new TuyaContext({
  baseUrl: 'https://openapi.tuyaus.com',
  accessKey: 'hidden',
  secretKey: 'hidden',
})

async function test () {
  const device_id = 'hidden'
  const devicedetail = await context.device.detail({
    device_id: device_id,
  })
  if (! devicedetail.success) {
    new Error()
  }

  console.log('Device details:', devicedetail)
}

test()

But I'm getting this error:

Device details: {
  code: 60009001,
  msg: 'API permission package error. For the solution, see https://developer.tuya.com/en/docs/iot/authentication-method?id=Ka49gbaxjygox.',
  success: false,
  t: 1719470515607,
  tid: '585338b5345011ef9c7442b1fe1466b5'
}

There is no explanation how it should work

@calvinwyoung
Copy link

@vedmant I'm running into the same issue — did you ever find a solution?

@Pierre-Gilles
Copy link

Same here on Gladys Assistant (https://github.com/GladysAssistant/Gladys), we are using this package and it stopped working since this summer

Did you find any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants