jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
103 stars 17 forks source link

Add support for API Key and Key ID #105 #113

Closed mrlt8 closed 1 year ago

mrlt8 commented 1 year ago

This will switch the auth request to the /api/user/login endpoint if keyId and apiKey are configured.

This change is necessary to ensure compatibility with the upcoming changes outlined here: https://support.wyze.com/hc/en-us/articles/16129834216731

jfarmer08 commented 1 year ago

Thank you for this.

Does this preserve the current authentication mechanism? If so what happens when both are in the config?

mrlt8 commented 1 year ago

You still need the username/password AND the apikey/keyid headers for the new endpoint.

I believe it should preserve the existing login method if you don't supply an API key/id:

https://github.com/mrlt8/homebridge-wyze-smart-home/blob/main/src/wyz-api/index.js#L136-L139