cyr-ius / cozytouchpy

Cozytouch python implementation
GNU General Public License v3.0
12 stars 7 forks source link

401 on login #14

Closed bpingris closed 3 years ago

bpingris commented 3 years ago

Hi, I tried to test your library but unfortunatly I had a 401 on client.connect.

I believe it's related to the credentials I used, I put as username and password those I'm using to connect on the mobile application "Atlantic Cozytouch". What kind of credentials should I use?

Thanks!

iMicknl commented 3 years ago

@bpingris they migrated to their own authentication system. You need to implement this change: https://github.com/dubocr/overkiz-client/pull/3/files.

See https://github.com/iMicknl/ha-tahoma/issues/589 for context.

bpingris commented 3 years ago

ok I see, thanks for the reply!

I already saw this in another repository, and I'm wondering if the Authorization token will change in the future, and if it does, how can I get it?

iMicknl commented 3 years ago

For example you can retrieve this one by decompiling their Android app (APK). If it will change, they will need to update their apps as well.

bpingris commented 3 years ago

ok so a rule of thumb would be that when the app is updated, one should decompile it to fetch the token. Thanks again!

iMicknl commented 3 years ago

@bpingris I don't think they will replace the token on every update, however you never know. My best guess is that this will work, until their next major (breaking) update.