codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.04k stars 332 forks source link

Error: GET_TOKEN_FAILED 2007, your ip(120.84.*.246) cross-region access is not allowed #568

Closed kairui1108 closed 1 year ago

kairui1108 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Debug Output Post the output of your program/app/script when run with the DEBUG environment variable set to *. Example: DEBUG=* node test.js. Copy the output and paste it below (in between the code fences):

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

codetheweb commented 2 years ago

Can you please fill out the above template?

tmkasun commented 2 years ago

I'm too getting this error

Error: GET_TOKEN_FAILED 2007
✖ Device(s) failed to be registered!
Error: GET_TOKEN_FAILED 2007, your ip(112.135.209.226) cross-region access is not allowed
    at TuyaOpenApiClient.<anonymous> (/home/user/.nvm/versions/node/v16.13.1/lib/node_modules/@tuyapi/cli/node_modules/@tuya/tuya-connector-nodejs/lib/core/client.js:123:35)
    at step (/home/user/.nvm/versions/node/v16.13.1/lib/node_modules/@tuyapi/cli/node_modules/@tuya/tuya-connector-nodejs/lib/core/client.js:52:23)
    at Object.next (/home/user/.nvm/versions/node/v16.13.1/lib/node_modules/@tuyapi/cli/node_modules/@tuya/tuya-connector-nodejs/lib/core/client.js:33:53)
    at fulfilled (/home/user/.nvm/versions/node/v16.13.1/lib/node_modules/@tuyapi/cli/node_modules/@tuya/tuya-connector-nodejs/lib/core/client.js:24:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)