Open dwaynez opened 4 months ago
Check your API key - they expire after one year and need to be generated again.
The key had not expired, but I generated a new one anyway. The refresh token fails immediately on use. Here is my test code. import os from wyze_sdk import Client t_email="xxxx" pswd="yyy" api="zzz" # generated 07-16-2024 09:27:12 expires 1 year keyid="aaaa" response = Client().login( email=t_email, password=pswd, key_id=keyid, api_key=api ) print(response) client = Client(token=response['access_token']) print(client.cameras.list()) client = Client(refresh_token=response['refresh_token']) resp = client.refresh_token() print("resp=",resp) print(client.cameras.list())
This results in the camera list bring printed once, but the call to client.refresh_token() causes:
Traceback (most recent call last):
File "/home/pi/zhm/devl/testwyze.py", line 22, in
I'm noticing this as well, but it started July 5 for me
looks like we are not the only ones: https://forums.wyze.com/t/refresh-tokens-not-working/303714
The code is fine.
I believe the problem is the refresh token from the developer API. It works if you use a refresh token from the oauth endpoint.
I'm using the exact same code for myself and for a friend, and my account works but his doesn't.
In both cases I use the refresh token from the developer api like @dwaynez does above
@xcz011 Could you look into the refresh token from the /api/user/login
endpoint?
@xcz011 Could you look into the refresh token from the
/api/user/login
endpoint?
Thanks @mrlt8, we noticed this issue as well, the plan to fix is next week. I will share update here once we fix this issue.
@xcz011 is there a simple workaround we can use in the meantime? no worries if not, I am just wondering
@renschler The access token is still valid, so you could just run login
when needed.
@mrlt8 @renschler this issue got fixed. please retry and let's know the result. Thanks
thanks @xcz011 will let you know if I run into any further issues. congrats on the new wyze 3 app launch!
Has something changed? As of today (July 15, 2024) I am getting the error message "refresh token is error." and I am unable to refresh the access token with the refresh token.