cli
cli copied to clipboard
There was an issue fetching that device. Make sure your account is linked and the ID is correct.
~> tuya-cli wizard
? The API key from tuya.com: xxx
? The API secret from tuya.com xxx
? Provide a 'virtual ID' of a device currently registered in the app: xxx
There was an issue fetching that device. Make sure your account is linked and the ID is correct.
~> tuya-cli -V
1.15.2
Have triple checked. I am sure I've followed the directions for the key / secret / virtual id.
Please run DEBUG=* tuya-cli wizard
and post the output.
bash-3.2$ DEBUG=* tuya-cli wizard
? The API key from tuya.com: xxx
? The API secret from tuya.com xxx
? Provide a 'virtual ID' of a device currently registered in the app: xxx
[
Error: you don't have access to this API
at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31)
at EventEmitter.<anonymous> (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
at processTicksAndRejections (node:internal/process/task_queues:94:5),
Error: you don't have access to this API
at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31)
at EventEmitter.<anonymous> (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
at processTicksAndRejections (node:internal/process/task_queues:94:5),
Error: you don't have access to this API
at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31)
at EventEmitter.<anonymous> (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
at processTicksAndRejections (node:internal/process/task_queues:94:5),
Error: you don't have access to this API
at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31)
at EventEmitter.<anonymous> (/Users/chrisjshull/homebrew/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
]
There was an issue fetching that device. Make sure your account is linked and the ID is correct.
It looks like you might have missed step 5 here.
Aha! I missed the part in 5 about authorizing the project.
Anyway, should https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md#linking-a-tuya-device-with-smart-link be linked from the readme for this project?
And can a better error be output for this case than "There was an issue fetching that device. Make sure your account is linked and the ID is correct."?
I have the same error,could you please help me check the log as follow?thank you very much!
[Error: GET_TOKEN_FAILED 2007, your ip(1**.*..*0) cross-region access is not allowed
at TuyaOpenApiClient.
There was an issue fetching that device. Make sure your account is linked and the ID is correct.