pymyq icon indicating copy to clipboard operation
pymyq copied to clipboard

Update request.py

Open rtorchia opened this issue 2 years ago • 4 comments

added to check for status 403 error. This corrects recent errors many have been complaining about in Home Assistant

rtorchia avatar Sep 09 '23 22:09 rtorchia

How does refreshing the user agent correct the 403 error?

michaeldavie avatar Sep 10 '23 03:09 michaeldavie

This isn't the right fix. The issue is that a UA is not being sent and myq seems to be blocking such requests. Per https://github.com/home-assistant/core/issues/99947#issuecomment-1712581193, it seems that by changing line 34 in request.py from

self._useragent = None

to

self._useragent = str("anytexthere")

corrects the 403 error.

adamysu avatar Sep 10 '23 04:09 adamysu

It looks like this PR should be closed in favour of #182.

michaeldavie avatar Sep 10 '23 16:09 michaeldavie

This fixed the issue. Without this, the app kept retrying the same expired JWT token. It is now working 100% for me.

deanq avatar Oct 05 '23 07:10 deanq