bimmerconnected / bimmer_connected

🚘 Library to query the status of your BMW or Mini from the ConnectedDrive portal
Apache License 2.0
362 stars 79 forks source link

Connection Issue: Authentication failed #393

Closed blenni closed 2 years ago

blenni commented 2 years ago

Describe the issue

Connection is no longer possible. MyBMW-App is still working, password has not been changed. Last successful update was about 24h ago, error also occured before this last update

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): cocoapi.bmwgroup.com:443
DEBUG:urllib3.connectionpool:https://cocoapi.bmwgroup.com:443 "GET /eadrax-ucs/v1/presentation/oauth/config HTTP/1.1" 200 580
DEBUG:bimmer_connected.account:Authenticating against GCDM with MyBMW flow.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): customer.bmwgroup.com:443
DEBUG:urllib3.connectionpool:https://customer.bmwgroup.com:443 "POST /gcdm/oauth/authenticate HTTP/1.1" 401 190
ERROR:bimmer_connected.account:Authentication failed (invalid_client): Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)
ERROR:bimmer_connected.account:401 Client Error: Unauthorized for url: https://customer.bmwgroup.com/gcdm/oauth/authenticate
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 94, in _get_oauth_token
    token_data = self._login_row_na()
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 220, in _login_row_na
    raise ex
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 170, in _login_row_na
    response.raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://customer.bmwgroup.com/gcdm/oauth/authenticate
Traceback (most recent call last):
  File "/home/pi/.local/bin/bimmerconnected", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/cli.py", line 282, in main
    args.func(args)
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/cli.py", line 127, in fingerprint
    log_responses=time_dir)
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 83, in __init__
    self._get_vehicles()
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 376, in _get_vehicles
    self._get_oauth_token()
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 108, in _get_oauth_token
    raise ex
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 94, in _get_oauth_token
    token_data = self._login_row_na()
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 220, in _login_row_na
    raise ex
  File "/home/pi/.local/lib/python3.7/site-packages/bimmer_connected/account.py", line 170, in _login_row_na
    response.raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://customer.bmwgroup.com/gcdm/oauth/authenticate

Expected behavior

Authentication is working, data is fetched correctly

Which Home Assistant version are you using?

None

What was the last working version of Home Assistant Core?

No response

What is your region?

Rest of world

ConnectedDrive website

Number of cars

Output of bimmer_connected fingerprint

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Nhubbers commented 2 years ago

I experience the same issue.

[x] I can still successfully login to the BMW ConnectedDrive website and the car status is available there. [x] I have ConnectedDrive enabled for my vehicle. [x] Rest of world

1 BMW linked to the account

github-actions[bot] commented 2 years ago

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.