Kia EU: token generated with OneApp/CCI flow fails in evcc with HTTP 400 on legacy token endpoint
Describe the bug
A token for my EU Kia was generated successfully with TMA84/bluelink-refresh-token v6.9.0.
The new OneApp/CCI login completed successfully in the token generator:
Headless: redirect → https://oneapp.kia.com/redirect?...&login_success=y
Headless: authorization code received.
Headless: exchanging code for CCI tokens...
After entering the generated token into the Kia vehicle configuration in evcc,
evcc cannot create the vehicle and fails with:
text
cannot create vehicle type 'template': cannot create vehicle type 'kia':
login failed: unexpected status: 400 (Bad Request)
POST https://idpconnect-eu.kia.com/auth/api/v2/user/oauth2/token
The official Kia Connect Android app works and vehicle status is available.
It appears that evcc still uses the legacy EU Kia token endpoint
idpconnect-eu.kia.com, while the token generator v6.9.0 successfully uses
the newer OneApp/CCI login flow.
Environment: evcc on Linux in a Proxmox LXC container.
I can test a fix with an EU Kia account.
### Steps to reproduce
1. Open evcc Web UI → Configuration.
2. Add or edit a vehicle using the Kia template.
3. Select Kia EU and enter the refresh token generated with
TMA84/bluelink-refresh-token v6.9.0.
4. Save the vehicle configuration.
5. evcc fails with HTTP 400 while calling the legacy Kia token endpoint.
### Configuration details
```yaml
Configured via the evcc web UI (no evcc.yaml file).
Vehicle template: Kia
Region: EU
Username: redacted
Refresh token: redacted
VIN: redacted
Log details
Kia EU token was generated successfully with TMA84/bluelink-refresh-token v6.9.0 using the OneApp/CCI flow.
cannot create vehicle type 'template': cannot create vehicle type 'kia':
login failed: unexpected status: 400 (Bad Request)
POST https://idpconnect-eu.kia.com/auth/api/v2/user/oauth2/token
cannot create vehicle type 'template': cannot create vehicle type 'kia':
login failed: unexpected status: 400 (Bad Request)
POST https://idpconnect-eu.kia.com/auth/api/v2/user/oauth2/token
What type of operating system or environment does evcc run on?
Linux
External automation
- [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.
Nightly build
- [x] I have verified that the issue is reproducible with the latest nightly build
Version
evcc version 0.314.0-dev+eaa49fceb
Thanks for the detailed report. I looked at evcc's Kia EU implementation:
vehicle/bluelink.gohardcodes the legacy Kia EU client credentials (CCSPServiceID: fdc85c00-0a2f-4c64-bcb4-2cfb1500730a,LoginFormHost: https://idpconnect-eu.kia.com).vehicle/bluelink/identity.goLogin()/refreshToken()treats the configured "password" as arefresh_tokenand immediately POSTs it toidpconnect-eu.kia.com/auth/api/v2/user/oauth2/tokentogether with that hardcoded client id/secret — exactly the call that fails with400in your log.
This matches your theory: TMA84/bluelink-refresh-token v6.9.0 apparently now issues EU Kia tokens via a newer "OneApp/CCI" login flow, which is likely tied to a different client id/backend than the legacy CCSP app evcc still targets. evcc has no code for a OneApp/CCI flow at all, so a refresh token minted that way isn't expected to work against the legacy endpoint.
To pin this down further, could you help with:
- Whether an older version of
TMA84/bluelink-refresh-token(pre-6.9.0, using the old EU login flow) still produces a token that evcc accepts with your account — this tells us whether Kia has fully retired the legacy backend or the tool just changed its default flow. - Any details from the token generator about the OneApp/CCI flow's token endpoint / client id (if logged/visible), so a proper fix can target the right backend instead of guessing at undocumented credentials.
Without that, I can't confirm whether this needs a code change in evcc (new OneApp/CCI client support) or is purely a case of using a newer, currently-incompatible token generator version. I'll leave this open for your input rather than guessing.
🤖 Generated with Claude Code
So: what is the new flow and where are the endpoints documented and is this a general rule for international audience?
Thank you for looking into this.
The legacy EU Kia flow cannot be tested successfully with an older token generator version anymore: it has been server-side/WAF blocked since 2026-08-11. TMA84 generator v6.8.1 failed for me with the legacy flow, redirecting back to the login page. Therefore, I do not expect an older generator version to produce a legacy token that evcc can accept.
The relevant upstream implementation is here:
Hyundai-Kia-Connect/hyundai_kia_connect_api#1273
It implements the new EU OneApp/CCI flow for both Kia and Hyundai.
As described in that PR, the EU Kia flow is:
- GET authorize using the Kia OneApp client_id and
https://oneapp.kia.com/redirect - GET certificates / RSA public key
- POST
/auth/account/signinwith RSA-encrypted password - Receive authorization code at the OneApp redirect
- POST to the Kia CCI API token endpoint using the code
- Exchange the CCI token set for a CCS token
- Refresh via the CCI v2 token-refresh endpoint, then exchange again for the CCS token used by the existing vehicle/control API endpoints.
Important: the new CCI refresh flow requires more than one single legacy refresh token. The upstream implementation persists a CCI token set (including the existing refresh token plus additional distinct CCI/exchange tokens) because all values are required for later token refreshes.
Scope appears to be EU Kia and EU Hyundai only. Genesis EU keeps the legacy flow, and the other regions are separate API implementations and were not changed in the upstream PR.
For my EU Kia, TMA84/bluelink-refresh-token v6.9.0 successfully completed the new flow:
Headless: redirect → https://oneapp.kia.com/redirect?...&login_success=y
Headless: authorization code received.
Headless: exchanging code for CCI tokens...
However, evcc currently accepts only a single refresh token in the vehicle
configuration and then calls the legacy
idpconnect-eu.kia.com/auth/api/v2/user/oauth2/token endpoint, which returns
HTTP 400.