From b16cfbabc8f14e874b578e91f5008fd185341d2c Mon Sep 17 00:00:00 2001 From: Anshu Arya Date: Mon, 3 Jan 2022 11:58:01 -0800 Subject: [PATCH] Refresh token response update (#61) Response has changed to provide tokens inside "data" --- wyze_sdk/api/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wyze_sdk/api/client.py b/wyze_sdk/api/client.py index ad87769..0b039b1 100644 --- a/wyze_sdk/api/client.py +++ b/wyze_sdk/api/client.py @@ -151,7 +151,7 @@ def refresh_token(self) -> WyzeResponse: if self._refresh_token is None: raise WyzeClientConfigurationError("client is not logged in") response = self._api_client().refresh_token(refresh_token=self._refresh_token) - self._update_session(access_token=response["access_token"], refresh_token=response["refresh_token"]) + self._update_session(access_token=response["data"]["access_token"], refresh_token=response["data"]["refresh_token"]) return response def user_get_info(self) -> WyzeResponse: