rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.73k stars 532 forks source link

Error: No permissions. This API is not subscribed. #490

Open lironas opened 3 years ago

lironas commented 3 years ago

I'm getting this error

can you help?

[ Error: No permissions. This API is not subscribed. at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31) at EventEmitter. (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38) at processTicksAndRejections (internal/process/task_queues.js:97:5), Error: No permissions. This API is not subscribed. at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31) at EventEmitter. (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38) at processTicksAndRejections (internal/process/task_queues.js:97:5), Error: No permissions. This API is not subscribed. at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31) at EventEmitter. (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38) at processTicksAndRejections (internal/process/task_queues.js:97:5), Error: No permissions. This API is not subscribed. at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/openapi/dist/api.js:74:31) at EventEmitter. (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38) at processTicksAndRejections (internal/process/task_queues.js:97:5) ]

yousefabed commented 3 years ago

Try this: In your Tuya IoT project, go the API and search for "Smart Home Devices Management" and subscribe.

del13r commented 3 years ago

Hi,

I followed all the instructions too and got this

tuya-cli link --api-key XXX --api-secret XXX --schema XXX --ssid XXX --password XXX --region eu

✖ Device(s) failed to be registered!
Error: No permissions. This API is not subscribed.
    at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/link/node_modules/@tuyapi/openapi/dist/api.js:68:31)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

I also subscribed to 'Smart Home Devices Management' API

kalyway101 commented 3 years ago

I wanted to follow up and say I am getting the exact same issue. Even after the directions were updated and I "subscribed"

del13r commented 3 years ago

I wanted to follow up and say I am getting the exact same issue. Even after the directions were updated and I "subscribed"

I found another way to do this without using the command line app.

see my post here https://community.home-assistant.io/t/inkbird-ibs-m1-with-ibs-p01/255050/20?u=del13r

kalyway101 commented 3 years ago

I wanted to follow up and say I am getting the exact same issue. Even after the directions were updated and I "subscribed"

I found another way to do this without using the command line app.

see my post here https://community.home-assistant.io/t/inkbird-ibs-m1-with-ibs-p01/255050/20?u=del13r

This worked fantastically well!! Getting the local key via the API Explorer was incredibly easy and didn't require me to run any commands or setup npm (though I had already done this). I'll definitely recommend this method via the issue from the original tuyaapi repo here: https://github.com/codetheweb/tuyapi/issues/485