evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Hyundai Kia: Refresh Token funktioniert nicht mehr

Open Fiscoba opened this issue 7 months ago • 0 comments

Description

Habe alles exakt der Anleitung gemacht. Nach dem login im Browser wird man auf eine Seite weitergeleitet wo follgender Fehler kommt: Invalid request. The page is not working. The page cannot be loaded due to an invalid request, such as an incorrect address. Please check the address or request details and try again.

Steps to Reproduce

PS C:\Program Files> cd "C:\ProgramData" PS C:\ProgramData> wget -O bluelinktoken.py https://raw.githubusercontent.com/RustyDust/bluelink_refresh_token/refs/heads/main/bluelinktoken.py PS C:\ProgramData> python -m venv .venv PS C:\ProgramData> ..venv\Scripts\Activate.ps1 (.venv) PS C:\ProgramData> python -m pip install --upgrade pip Requirement already satisfied: pip in ..venv\Lib\site-packages (26.0.1) (.venv) PS C:\ProgramData> pip install selenium requests webdriver-manager Collecting selenium Using cached selenium-4.43.0-py3-none-any.whl.metadata (7.5 kB) Collecting requests Using cached requests-2.33.1-py3-none-any.whl.metadata (4.8 kB) Collecting webdriver-manager Using cached webdriver_manager-4.0.2-py2.py3-none-any.whl.metadata (12 kB) Collecting certifi>=2026.1.4 (from selenium) Using cached certifi-2026.4.22-py3-none-any.whl.metadata (2.5 kB) Collecting trio<1.0,>=0.31.0 (from selenium) Using cached trio-0.33.0-py3-none-any.whl.metadata (8.5 kB) Collecting trio-websocket<1.0,>=0.12.2 (from selenium) Using cached trio_websocket-0.12.2-py3-none-any.whl.metadata (5.1 kB) Collecting typing_extensions<5.0,>=4.15.0 (from selenium) Using cached typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB) Collecting urllib3<3.0,>=2.6.3 (from urllib3[socks]<3.0,>=2.6.3->selenium) Using cached urllib3-2.6.3-py3-none-any.whl.metadata (6.9 kB) Collecting websocket-client<2.0,>=1.8.0 (from selenium) Using cached websocket_client-1.9.0-py3-none-any.whl.metadata (8.3 kB) Collecting attrs>=23.2.0 (from trio<1.0,>=0.31.0->selenium) Using cached attrs-26.1.0-py3-none-any.whl.metadata (8.8 kB) Collecting sortedcontainers (from trio<1.0,>=0.31.0->selenium) Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl.metadata (10 kB) Collecting idna (from trio<1.0,>=0.31.0->selenium) Using cached idna-3.13-py3-none-any.whl.metadata (8.0 kB) Collecting outcome (from trio<1.0,>=0.31.0->selenium) Using cached outcome-1.3.0.post0-py2.py3-none-any.whl.metadata (2.6 kB) Collecting sniffio>=1.3.0 (from trio<1.0,>=0.31.0->selenium) Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB) Collecting cffi>=1.14 (from trio<1.0,>=0.31.0->selenium) Using cached cffi-2.0.0-cp313-cp313-win_amd64.whl.metadata (2.6 kB) Collecting wsproto>=0.14 (from trio-websocket<1.0,>=0.12.2->selenium) Using cached wsproto-1.3.2-py3-none-any.whl.metadata (5.2 kB) Collecting pysocks!=1.5.7,<2.0,>=1.5.6 (from urllib3[socks]<3.0,>=2.6.3->selenium) Using cached PySocks-1.7.1-py3-none-any.whl.metadata (13 kB) Collecting charset_normalizer<4,>=2 (from requests) Using cached charset_normalizer-3.4.7-cp313-cp313-win_amd64.whl.metadata (41 kB) Collecting python-dotenv (from webdriver-manager) Using cached python_dotenv-1.2.2-py3-none-any.whl.metadata (27 kB) Collecting packaging (from webdriver-manager) Using cached packaging-26.1-py3-none-any.whl.metadata (3.5 kB) Collecting pycparser (from cffi>=1.14->trio<1.0,>=0.31.0->selenium) Using cached pycparser-3.0-py3-none-any.whl.metadata (8.2 kB) Collecting h11<1,>=0.16.0 (from wsproto>=0.14->trio-websocket<1.0,>=0.12.2->selenium) Using cached h11-0.16.0-py3-none-any.whl.metadata (8.3 kB) Using cached selenium-4.43.0-py3-none-any.whl (9.6 MB) Using cached trio-0.33.0-py3-none-any.whl (510 kB) Using cached trio_websocket-0.12.2-py3-none-any.whl (21 kB) Using cached typing_extensions-4.15.0-py3-none-any.whl (44 kB) Using cached urllib3-2.6.3-py3-none-any.whl (131 kB) Using cached PySocks-1.7.1-py3-none-any.whl (16 kB) Using cached websocket_client-1.9.0-py3-none-any.whl (82 kB) Using cached requests-2.33.1-py3-none-any.whl (64 kB) Using cached charset_normalizer-3.4.7-cp313-cp313-win_amd64.whl (158 kB) Using cached idna-3.13-py3-none-any.whl (68 kB) Using cached webdriver_manager-4.0.2-py2.py3-none-any.whl (27 kB) Using cached attrs-26.1.0-py3-none-any.whl (67 kB) Using cached certifi-2026.4.22-py3-none-any.whl (135 kB) Using cached cffi-2.0.0-cp313-cp313-win_amd64.whl (183 kB) Using cached outcome-1.3.0.post0-py2.py3-none-any.whl (10 kB) Using cached sniffio-1.3.1-py3-none-any.whl (10 kB) Using cached wsproto-1.3.2-py3-none-any.whl (24 kB) Using cached h11-0.16.0-py3-none-any.whl (37 kB) Using cached packaging-26.1-py3-none-any.whl (95 kB) Using cached pycparser-3.0-py3-none-any.whl (48 kB) Using cached python_dotenv-1.2.2-py3-none-any.whl (22 kB) Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB) Installing collected packages: sortedcontainers, websocket-client, urllib3, typing_extensions, sniffio, python-dotenv, pysocks, pycparser, packaging, idna, h11, charset_normalizer, certifi, attrs, wsproto, requests, outcome, cffi, webdriver-manager, trio, trio-websocket, selenium Successfully installed attrs-26.1.0 certifi-2026.4.22 cffi-2.0.0 charset_normalizer-3.4.7 h11-0.16.0 idna-3.13 outcome-1.3.0.post0 packaging-26.1 pycparser-3.0 pysocks-1.7.1 python-dotenv-1.2.2 requests-2.33.1 selenium-4.43.0 sniffio-1.3.1 sortedcontainers-2.4.0 trio-0.33.0 trio-websocket-0.12.2 typing_extensions-4.15.0 urllib3-2.6.3 webdriver-manager-4.0.2 websocket-client-1.9.0 wsproto-1.3.2 (.venv) PS C:\ProgramData> python .\bluelinktoken.py --brand hyundai Opening login page: https://idpconnect-eu.hyundai.com/auth/api/v2/user/oauth2/authorize?client_id=peuhyundaiidm-ctb&redirect_uri=https%3A%2F%2Fctbapi.hyundai-europe.com%2Fapi%2Fauth&nonce=&state=NL_&scope=openid+profile+email+phone&response_type=code&connector_client_id=peuhyundaiidm-ctb&connector_scope=&connector_session_key=&country=&captcha=1&ui_locales=en-US

================================================== Please log in manually in the browser window. The script will wait for you to complete the login...

✅ Login successful! Element found. Redirecting to: https://idpconnect-eu.hyundai.com/auth/api/v2/user/oauth2/authorize?response_type=code&client_id=6d477c38-3ca4-4cf3-9557-2a1929a94654&redirect_uri=https://prd.eu-ccapi.hyundai.com:8080/api/v1/user/oauth2/token&lang=de&state=ccsp

  • [1] Waiting for redirect URLwith code
  • [2] Waiting for redirect URLwith code
  • [3] Waiting for redirect URLwith code
  • [4] Waiting for redirect URLwith code
  • [5] Waiting for redirect URLwith code
  • [6] Waiting for redirect URLwith code
  • [7] Waiting for redirect URLwith code
  • [8] Waiting for redirect URLwith code
  • [9] Waiting for redirect URLwith code
  • [10] Waiting for redirect URLwith code

❌ Failed to get redirected to correct URL, got https://idpconnect-eu.hyundai.com/error?status=400&error=Bad+Request&error_description=Bad+Request.+It+was+classified+as+an+abusing+request+and+blocked.+client_id+%3A+6d477c38-3ca4-4cf3-9557-2a1929a94654&loginUrl=&ui_locales=en-US instead An unexpected error occurred: 'NoneType' object has no attribute 'group'

Image

Version

v0.305.1

System

linux/amd64, CEST +02:00

Fiscoba avatar Apr 23 '26 12:04 Fiscoba