http-error 403(forbidden), when logging in to BMW.
since so time (maybe yesterday?), i get an http-error 403(forbidden), when logging in to BMW.
it is a problem with more accounts, not only mine. Location ist Germany therefor "rest of world".
to be sure, i have upgraded to newest bimmerconnect-version
it is no problem, to log in with the original bmw-app
has anyone else this problem?
Originally posted by @demel42 in https://github.com/bimmerconnected/bimmer_connected/discussions/443
Getting the same as well. I think BMW may be trying to block this kind of requests. Here is the timeline of events as I saw them (all times are UK time which is currently UTC+01:00):
2022-05-27 08:49:35.549 First error
429 errors every 10 mins:
2022-05-27 09:04:07.499 Connected Drive Warning BMW Connected Drive Account: get_account error: Client error '429 Too Many Requests' for url 'https://cocoapi.bmwgroup.com/eadrax-vcs/v1/vehicles?apptimezone=60.0&appDateTime=1653638646803&tireGuardMode=ENABLED' For more information check: https://httpstatuses.com/429
2022-05-27 10:19:18.044 Final successful refresh.
Errors changed to 403:
2022-05-27 10:24:14.078 Connected Drive Warning BMW Connected Drive Account: get_account error: Client error '403 Forbidden' for url 'https://cocoapi.bmwgroup.com/eadrax-ucs/v1/presentation/oauth/config' For more information check: https://httpstatuses.com/403
The My BMW app is still able to receive updates so clearly the API is rejecting the traffic from this package.
I'll double check what the app is doing, either tonight or tomorrow.
I put some PR pressure, retweet if you can/care: https://twitter.com/cdturri/status/1530200478881021955
Same problem as above. 403 error.
+1
BMW apparently really does not like using accessing their APIs. They have blocked our specific user agent. While a fix is on the way, I cannot guarantee they won't do the same again soon - its a game of cat and mouse. They surely will monitor what we are doing and try to find other ways to block the library access.
Could you make the user agent a parameter so people can easily change it to whatever they want? It will allow users to fix the issue by themselves in the future.
I can't understand why BMW try to stop using their API's? Why do they even have an API?
Actually, they do not have a (public) API. So it's really not surprising that they want to stop people from using the PRIVATE API they're using for the mobile apps.
Actually, they do not have a (public) API. So it's really not surprising that they want to stop people from using the PRIVATE API they're using for the mobile apps.
Ok understand. But it would better they release it as public API (make their car owners more happy)
The percentage of their car owners that care about using anything other than the mobile app approaches zero...
the changes of user-agent and x-user-agent seems to work for me.
Thank you for your help and great work.
May I ask one more question? I don't use bimmer_connect directly because I don't use python but translate it into php (for integration into the smarthome solution IP-Symcon). Now you have carried out the changeover to async and made changes in this context, including the introduction of the bmw-session-id and correlation-id. The previous procedure still works - after adjusting the user-agent-ids. My question for understanding is what was the reason for the changes?
Same here after issuing a:
pip3 install --upgrade bimmer_connected
DEBUG:httpx._client:HTTP Request: GET https://cocoapi.bmwgroup.com/eadrax-ucs/v1/presentation/oauth/config "HTTP/1.1 403 Forbidden"
I like y our PHP thought @demel42 , for me the PHP would be used to get the data in Domoticz.
working for me, too 👍
With respect to the cocoapi: yes, it was not meant to be publicly available but accessed by BMW applications via public networks (in contrast to vpn like vehicle to backend telematics channels). The intention from security perspective is to block old MyBMW app releases which might and will become vulnerable over time.
@sincze my repo ist here: https://github.com/demel42/IPSymconBMWConnectedDrive there is some stuff inside for integration in IP-Symcon, but yo can see, how it works in php. feel free
working for me, too 👍
With respect to the cocoapi: yes, it was not meant to be publicly available but accessed by BMW applications via public networks (in contrast to vpn like vehicle to backend telematics channels). The intention from security perspective is to block old MyBMW app releases which might and will become vulnerable over time.
When using: plain bimmerconnected python version, anything I need to change somewhere as well to have it up and running again with the latest bimmerconnected version ? or should that work out of the box?
Many thanks for the quick fix! Working for me again too after I installed from master branch. If you want this update you will need to wait until a new package release is created before you can upgrade directly with pip. In the meantime you can get the latest code from master branch as follows:
git clone https://github.com/bimmerconnected/bimmer_connected.git
cd ./bimmer_connected
pip install -e .
It sounds like you've done a great job of fixing the 'user agent' issue. Well done, thank you. When will an updated version of bimmerconnected.exe be ready as I use the CLI not HA?
If you update to 0.9.2, then it should be fixed for you as well.
I applied the update and bimmerconnected.exe was removed and not replaced.