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

Resolve issues with API changes from Wyze (2024-02-01) #3

Merged
merged 2 commits into from
Feb 4, 2024

Conversation

hgoscenski
Copy link
Collaborator

Attempt to resolve #2

  • Update check in _performRequest to handle SUCCESS as valid msg, this appears to be a change in the API.
  • Update user-agent to be more general, rather than a specific user agent from a browser.

Verification of user agent functionality:

[08:21:03] ~/wyze-homebridge λ curl --write-out '%{http_code}' -SsL --output /dev/null -XPOST -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\"}" --header "Content-Type: application/json" --header "apikey: $API_KEY" --header "keyid: $KEY_ID" --header "User-Agent: unofficial-wyze-api/1.0" https://auth-prod.api.wyze.com/api/user/login
200%

- Update check in `_performRequest` to handle `SUCCESS` as valid `msg`,
  this appears to be a change in the API.
- Update user-agent to be more general, rather than a specific user
  agent from a browser.

Verification of user agent functionality:

```
[08:21:03] ~/wyze-homebridge λ curl --write-out '%{http_code}' -SsL --output /dev/null -XPOST -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\"}" --header "Content-Type: application/json" --header "apikey: $API_KEY" --header "keyid: $KEY_ID" --header "User-Agent: unofficial-wyze-api/1.0" https://auth-prod.api.wyze.com/api/user/login
200%
```
src/index.js Outdated Show resolved Hide resolved
Co-authored-by: TJ <github@tnoor.dev>
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

Successfully merging this pull request may close these issues.

Getting an authentication error via Wyze Homebridge plug-in
3 participants