Closed muxiachuixue closed 2 years ago
Thanks for the detailed report! Indeed it seems that BMW have opted to shut down their API by filtering out user agents...
Thanks for the detailed report! Indeed it seems that BMW have opted to shut down their API by filtering out user agents...
Thanks. I modified the codes in account.py and now the integration in HA works well.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Describe the issue
The integration in HA suddenly gave me an error this morning:
Forbidden for url: https://myprofile.bmw.com.cn/eadrax-coas/v1/cop/publickey
I've tried to reboot the host and delete the integration then re-add it. However, no luck. I opened the urlhttps://myprofile.bmw.com.cn/eadrax-coas/v1/cop/publickey
in Chrome on my laptop (different network from the HA) and got the error403 Forbidden. Microsoft-Azure-Application-Gateway/v2
. Strangely, when I used Safari or IE to open it, the response is OK. I am not running any proxy server on HA and other integrations run perfectly. I guess there may be something wrong with the parameters of HTTP request.Edit: I used Charles to capture the packages of HTTP request of the url
https://myprofile.bmw.com.cn/eadrax-coas/v1/cop/publickey
in Chrome. I found that If I delete theCookie
parameter in the header, the response will be OK. In default, theCookie
parameter is added and a403 Forbidden
error is returned.Expected behavior
Fix the
Forbidden for url: https://myprofile.bmw.com.cn/eadrax-coas/v1/cop/publickey
error.Which Home Assistant version are you using?
core-2021.12.9
What was the last working version of Home Assistant Core?
core-2021.12.8
What is your region?
China
ConnectedDrive website
Number of cars
Output of bimmer_connected fingerprint