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

Request Failed: {"url":"api/user/login","status":400,"data":{"description":"Invalid User Name or Password." #241

Closed
therzog92 opened this issue Mar 30, 2024 · 4 comments
Labels
question Further information is requested

Comments

@therzog92
Copy link

therzog92 commented Mar 30, 2024

Describe Your Problem:
I cannot seem to get past the login step. I'm using Homebridge on Synology. I keep receiving invalid user name or password results.

I used curl to see if it was actually an issue with my user/password and it looks like it's not. I was able to use Postman with this call successfully. When I use the curl command in Homebridge terminal I get the Invalid Username or Password. Downloaded hoobs on a raspberry pi and got the same issue with this plugin on there, however the curl command when ssh'd into hoobs worked.

curl --location 'https://auth-prod.api.wyze.com/api/user/login'
--header 'Content-Type: application/json'
--header 'apikey: myapikey'
--header 'keyid: mykeyid'
--data-raw '{"email":"[email protected]","password":"mypassword md5'd x3"}'

Logs:

[3/30/2024, 12:30:48 AM] [Wyze] Performing request: {"method":"POST","url":"api/user/login","data":{"email":"[email protected]","password":"mypassword"},"baseURL":"https://auth-prod.api.wyze.com","headers":{"x-api-key":"WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ","apikey":"my api key","keyid":"my key id","User-Agent":"unofficial-wyze-api/1.1.7"}}

[3/30/2024, 12:30:49 AM] [Wyze] Request Failed: {"url":"api/user/login","status":400,"data":{"description":"Invalid User Name or Password.","requestId":"dbb7061f-2adc-484a-ae71-9c31f65eb57c","errorCode":1000},"headers":{"content-type":"application/json","transfer-encoding":"chunked","connection":"keep-alive","date":"Sat, 30 Mar 2024 05:30:49 GMT","x-ratelimit-remaining":"18","x-ratelimit-reset-by":"Sat Mar 30 05:38:48 GMT 2024","x-cache":"Error from cloudfront","via":"1.1 c68b898f33c21dc320564e472e8aaad2.cloudfront.net (CloudFront)","x-amz-cf-pop":"MCI50-P2","x-amz-cf-id":"SOJ28SexOlF0OLvnU4j1xaWKBzP4NdyHj6wFCVLe6NTb2Jl0SP0xyw=="}}

[3/30/2024, 12:30:49 AM] [Wyze] Error getting devices: AxiosError: Request failed with status code 400

Plugin Config:

{
"name": "Wyze",
"username": "[email protected]",
"password": "mypassword",
"keyId": "my key id",
"apiKey": "my api key",
"refreshInterval": 60000,
"hms": false,
"showAdvancedOptions": false,
"apiLogEnabled": true,
"pluginLoggingEnabled": true,
"lowBatteryPercentage": 30,
"excludeMacAddress": false,
"excludedeviceType": false,
"platform": "WyzeSmartHome"
}

Screenshots:

Environment:

  • Plugin Version: v0.5.46
  • Homebridge Version: 3.1.1
  • Node.js Version: v20.9.0
  • NPM Version: 10.1.0
  • Operating System: Synology DSM
@therzog92 therzog92 added the question Further information is requested label Mar 30, 2024
Copy link

Message that will be displayed on users' first issue

@jfarmer08
Copy link
Owner

jfarmer08 commented Mar 31, 2024 via email

@therzog92
Copy link
Author

therzog92 commented Apr 2, 2024

Does your apikey or keyID have any special characters? There has been issues with this. Thanks Allen :)

Just the standard dashes in the Key ID. I've regenerated the key a few times and tries those as well but result in the same error.

When running the API call on my NAS I get the same error. When running on Hoobs (have two instances, running on Pi and Mac Mini) terminal it works. But for the plugin I get an error saying missing API Key and KeyID, they aren't options in the config. When I add them manually to the JSON config I get an error saying that the json file doesn't exist in the persist library.

ERRORError getting devices: Error: ENOENT: no such file or directory, open '/var/lib/hoobs/tommy/persist/wyze-2e9e1fb2-f815-56ec-8f8a-18ee3195b468.json'

@therzog92
Copy link
Author

Installed homebridge on Pi and was able to get it to work. Must be an issue with hoobs or the homebridge install on NAS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants