mezz64 / pyEight

Python library to interface with the Eight Sleep API
MIT License
59 stars 15 forks source link

initialization fails due to 403 when partner is not sharing data #31

Open a-chaudhari opened 2 years ago

a-chaudhari commented 2 years ago

I'm trying to set up my eight sleep pod with HA using the eight sleep integration.

my partner doesn't have the "share sleep data" toggle on so trying to access her user data fails with a 403. this appears to be unhandled which causes the initialization to fail.

homeassistant       | 2022-07-20 22:17:59 DEBUG (MainThread) [pyeight.eight] Initializing pyEight Version: 0.3.0
homeassistant       | 2022-07-20 22:17:59 DEBUG (MainThread) [pyeight.eight] UserID: d167cbc87fb54843b4edaaef219a4aec, Token: *****
homeassistant       | 2022-07-20 22:17:59 DEBUG (MainThread) [pyeight.eight] Devices: ['4000280018504e3157303520'], POD: True
homeassistant       | 2022-07-20 22:18:00 ERROR (MainThread) [pyeight.eight] Error geting Eight data. 403, message='Forbidden', url=URL('https://client-api.8slp.net/v1/users/e8b305971bb845af823cf94663bc42e3')