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

{ error: 406, msg: 'Authentication failed' } I am using right email and password #232

Open
demokedes opened this issue Apr 26, 2024 · 3 comments

Comments

@demokedes
Copy link

Dear all,
I am new to ewelink API.
I tried to start using it, but I am constantly receiving an error: { error: 406, msg: 'Authentication failed' }
For sure, I am using right email and password, because I can login without any problem on ewelink portal. The problem might be in region. In the script, I am selecting 'eu', which should be the right region for Europe, but on the portal on the drop down menu, I select Slovenia, because there is no eu option.
What should be the reason.
Are there any requirement, to use this api? Do I need to have an advanced plan maybe?
Regards,
Rok

@mduchain
Copy link

The usual suspects are

  • old APP_ID (see #221)
  • being connected with the same account on your mobile app

no need for any plan, I'm using the api fine without.

@demokedes
Copy link
Author

@mduchain , thank you for your answer. old APP_ID might be the reason, but I don't know how to overcome it. What to do now. I am not using it on mobile app at the same time. Because of that I am having two different accounts, primary one that I am using on my mobile app, than I am having secondary one, that is shared through primary. This secondary's purpose is to connect through node-red, but I am getting this error. Any idea how to solve it?

@mduchain
Copy link

you need to check the APP_ID and APP_SECRET in constants.js
Use the ones mentioned in #221 - those are the ones I'm using.
APP_ID: 'Uw83EKZFxdif7XFXEsrpduz5YyjP7nTl',
APP_SECRET: 'mXLOjea0woSMvK9gw7Fjsy7YlFO4iSu6'

find your nodered node_modules folder, the constants.js file is in
/ewelink-api/src/data/constants.js

The account I'm using has been created in region 'eu', should work fine for you as well.

I found out that the event listener node does NOT work with shared accounts. It's a permission thing.
I had to use the secondary account on my app, which is very annoying because then there are certain
restrictions on the actions the app can perform, like network settings, upgrading, schedules, etc ...

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

2 participants