Custom Integration: Volkswagen WeConnect ID (Europe)

on ver 3.7 ?

I have loged in to myvolkswagen.de but didn’t find any unaccepted terms there. But still unable to add integration.
Here the log:
This error originated from a custom integration.

Logger: custom_components.volkswagen_we_connect_id.config_flow
Source: custom_components/volkswagen_we_connect_id/config_flow.py:65
integration: Volkswagen We Connect ID
First occurred: December 7, 2024, 22:46:32 (5 occurrences)
Last logged: 18:20:43

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 65, in async_step_user
    info = await validate_input(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 39, in validate_input
    await hass.async_add_executor_job(we_connect.login)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/weconnect/weconnect.py", line 184, in login
    self.__session.login()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
    response = self.doWebAuth(authorizationUrl)
  File "/usr/local/lib/python3.13/site-packages/weconnect/auth/we_connect_session.py", line 253, in doWebAuth
    afterLoginResponse = self.get(afterLoginUrl, allow_redirects=False, access_type=AccessType.NONE)
  File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/weconnect/auth/we_connect_session.py", line 69, in request
    return super(WeConnectSession, self).request(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        method, url, headers=headers, data=data, withhold_token=withhold_token, access_type=access_type, token=token, timeout=timeout, **kwargs
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/weconnect/auth/openid_session.py", line 188, in request
    raise InsecureTransportError()
oauthlib.oauth2.rfc6749.errors.InsecureTransportError: (insecure_transport) OAuth 2 MUST utilize https.

I have the same issue. Login in into vw account (and accepting the privacy) didn’t solved this.

This solved it for me, I had already accepted it once or twice (I didn’t get it anymore on the country page login, but from this landing page I got the approval again):

1 Like

I have been trying for weeks to login, and finally succeeded after I changed the country to Germany and back to Denmark.

Make sure the country code is the same on your VW profile as the region in the configuration.

I got an error saying that “Car with this VIN is already configured”. It seemed that I still had some old entities with “Volkswagen” in HAss. After deleting these (and accidently also deleting HACS) - and after a few restarts, I got it working.

1 Like

I deleted the integration and redownloaded it from hacs. I tried to install the integration and its giving an expected error when i enter my details and try to log in.

So stuck at square 1!

Update: Just tried @wassini 's solution and it worked for me! Do try! Under the german profile there will be some consents to agree to.

Lets see how long the integration works for now!

Works fine with 3.7

oke thanks
still not working for me i dont know what im doing wrong it worked fine until i got 3.7 in my id4 pro

Hi everyone,

I’m aware of the issues. The authentication problem stems from the underlying library and recent updates to the Volkswagen API.

As a temporary workaround, you can set your country to Germany and accept the terms in German. To do this, go to your profile on https://id.vwgroup.io/ and update your country to Germany.

See the github ticket for info:

2 Likes

There has been an update! Please try updating the hacs version.

1 Like

Is there any chance to get the integration working for North America, specifically the USA?

Thanks

Yes my issue is solved
I first changed it to Germany, tried again, didn’t work
when I changed it back to the Netherlands, it worked
thanks for thinking along :stuck_out_tongue_winking_eye:

1 Like

Thanks for the tip, this also worked for me !

Setting to DE and then back to BE worked for me. Thanks !

Anyone experiencing problems today? It was working fine until WeConnect-python was updated!

Had to do the German thing again in my account. Looks like its working now.