question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access key/token improperly parsed

See original GitHub issue

plugin 1.1.7 node 14.17

After proper setup following this tutorial: https://developer.tuya.com/en/docs/iot/Tuya_Homebridge_Plugin?id=Kamcldj76lhzt

accessKey in config.json seems to be parsed incorrectly: image

when accessKey is changed to accessToken, a different error occurs:

{
    "bridge": {
        "name": "Homebridge 4547",
        "username": "***********************",
        "port": ***********************,
        "pin": "***********************"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "options": {
                "username": "***********************",
                "password": "***********************",
                "accessId": "***********************",
-                 "accessKey": "6"***********************"b",
+                "accessToken": "6"***********************"b",
                "lang": "en",
                "projectType": "2",
                "appSchema": "tuyaSmart",
                "endPoint": "https://openapi.tuyaus.com",
                "countryCode": 123456,
                "debug": true
            },
            "name": "TuyaPlatform",
            "platform": "TuyaPlatform"
        }
    ]
}

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:28 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
rikray02commented, Jul 9, 2021

Hi guys, Sorry for a long period to test your suggest. First of all, thank you all for your help. After trying everything (Create a new account in Tuya platform, create a new cloud Project, modify JS files, etc…), I still cannot get my accessories. I now have the same problem as Kellemar, “Token Expired”.

I will therefore have a look at the ticket 41 side. Too bad it is so complicated to operate. Richard

1reaction
rikray02commented, Jun 19, 2021

Hello,

I tried to use this new plugin, but it doesn’t work and i receive this message:

Capture d’écran, le 2021-06-18 à 23 46 05

My configuration of JASON file is: Capture d’écran, le 2021-06-18 à 23 44 24

My configuration of Tuya Web Platform is: Capture d’écran, le 2021-06-18 à 23 39 11 Capture d’écran, le 2021-06-18 à 23 40 49 Capture d’écran, le 2021-06-18 à 23 41 48

I use the same email address for my account of the cell apps and Web Platform but the password is different.

I’m absolutely sure that my credential is OK on JASON file. An idea why i receive this error message?

Thanks for your help! Richard

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth token submitted with the request can not be parsed
I'm trying to implement a client that imports the events that a user has in Office 365 so that I can easily display...
Read more >
Resolve Microsoft Graph authorization errors
This error often means that the access token may be missing in the HTTP authenticate request header or that the token is invalid...
Read more >
OAuth2 token parsing fails - MuleSoft Help Center
During the token request/exchange, the documentation says that the MEL # [payload.'access_token'] (etc) should parse out of the body the various tokens, ...
Read more >
Troubleshooting AWS CLI errors - AWS Command Line Interface
General troubleshooting to try first. If you receive an error or encounter an issue with the AWS CLI, we suggest the following general...
Read more >
OAuth 2 Session — Authlib 1.2.0 documentation
There are two steps in OAuth 2 to obtain an access token with authorization code grant type. Initialize the session for reuse:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found