Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: don't send user-agent information to avoid 429 too many request error… #101

Conversation

lubbyhst
Copy link

@lubbyhst lubbyhst commented Nov 5, 2023

This PR removes the user-agent header from the requests. This avoids the API to send a 429 response.

I testet this within my own homeassist integration that uses this lib.

@pawelaugustyn
Copy link

I also tested that solution on my local HA. I confirm it fixes the issue.

@dvx76 dvx76 requested review from Farfar and dvx76 November 5, 2023 19:26
skodaconnect/const.py Outdated Show resolved Hide resolved
@dvx76
Copy link
Member

dvx76 commented Nov 5, 2023

Great catch @lubbyhst !

I was way sidetracked comparing with the API interactions the (new) MySkoda App performs. I got the token exchange working with the new endpoints but almost everything else also would need an update. We'll probably still need to do that in the future when they fully deprecated the "old" endpoints. But this hotfix at least unblocks everyone. Great job! 💯

LGTM with 1 comment to address.

This is what I think we should do with the UA
Use UA from const.py
Copy link
Collaborator

@Farfar Farfar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I think we should do with UA

skodaconnect/const.py Outdated Show resolved Hide resolved
@Farfar
Copy link
Collaborator

Farfar commented Nov 5, 2023

Fix outdated User-Agent causing HTTP 429 error.

@Farfar Farfar merged commit fee3d93 into skodaconnect:main Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants