Skip to content

Kia Europe Login Flow

cdnninja edited this page Sep 21, 2025 · 10 revisions

Introduction

Kia has recently made some changes to its login flow, which currently means that a Google reCAPTCHA must be solved during login. It is not currently possible to solve this automatically with python, which is why manual steps are necessary here.

Python scripts have been developed for this purpose, which take over at least part of the process of obtaining the necessary refresh_token, which must then be used as a password.

The procedure varies depending on the operating system and environment. However, we will document all variants here where possible so that every end user should be able to create their own personal refresh_token.

If you have any questions or need assistance, please review and utilize only this discussion.

See this issue if you are interested in more background information.


Security

NEVER EVER publish your refresh token or access token. If someone gets them, they will have full access to your Kia account and thus also to your car! No email address or password is required!


How to fetch refresh_token

Linux

Headless / Non-graphical

If you have access to a headless Linux via SSH, e.g., a Raspberry Pi, LXC, KVM, etc., you can use this option. This requires a few manual steps.

It is important that you use Chrome or one of its forks (Chromium, Brave, etc.), as the user agent can be changed there without an add-on.

Without setting the specific user agent, it is not possible to obtain the refresh_token!

Now to the procedure:

  1. Download this script
  2. Prepare environment and execute the script with python
  3. Follow the instructions in the script
  4. Save the refresh token (preferably in your password database as well)
  5. Enter the refresh token, instead of your Kia password, in the password field

Here is the procedure again as an example:

$ mkdir /tmp/kia && cd /tmp/kia
$ wget -O KiaFetchApiTokens.py https://gist.githubusercontent.com/marvinwankersteen/af92c571881ac76579a037fac4f3a63a/raw/8f59b802dce728dc547d3c012fadc86878ceceba/KiaFetchApiTokens.py
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip3 install requests

$ python3 KiaFetchApiTokens.py

Step 1: Open a new tab in your browser (best is Chrome), press CTRL+SHIFT+I (Developer Tools), press CTRL-SHIFT+P (Run Command), type 'network conditions', uncheck 'Use browser default' next to 'User agent' and set the following user agent:

        Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19_CCS_APP_AOS

Step 2: Open this URL in the new tab:

        https://idpconnect-eu.kia.com/auth/api/v2/user/oauth2/authorize?ui_locales=de&scope=openid+profile+email+phone&response_type=code&client_id=peukiaidm-online-sales&redirect_uri=https%3A%2F%2Fwww.kia.com%2Fapi%2Fbin%2Foneid%2Flogin&state=aHR0cHM6Ly93d3cua2lhLmNvbS9kZS8

Step 3: Solve the reCAPTCHA and login with your credentials. After successful login, you get redirected to Kia's homepage.
        Was the login successful? (y/n): y

        Fetch the connector_session_key...successful.

Step 4: Open the following URL in the SAME browser tab where you're logged in:

        https://idpconnect-eu.kia.com/auth/api/v2/user/oauth2/authorize?client_id=fdc85c00-0a2f-4c64-bcb4-2cfb1500730a&redirect_uri=https://prd.eu-ccapi.kia.com:8080/api/v1/user/oauth2/redirect&response_type=code&scope=&state=ccsp&connector_client_id=hmgid1.0-fdc85c00-0a2f-4c64-bcb4-2cfb1500730a&ui_locales=&connector_scope=&connector_session_key=f8761a96-10c8-41e6-80a6-75c265904c24

Step 5: A blank page will open with the URL from step 4 which starts with 'https://prd.eu-ccapi.kia.com:8080/api/v1/user/oauth2/redirect?code=...'
        Copy the full URL from the address bar and paste it here:

      > https://prd.eu-ccapi.kia.com:8080/api/v1/user/oauth2/redirect?code=9785a908-............-67706072d32d&state=ccsp&login_success=y

Step 6: ✅ Your tokens are:

        - Refresh Token: NTBIO.................................UWMJI3ZJZJ
        - Access Token: eyJhbGciOi.......................WI2iqczsxKq-dKKg

Graphical

If you have Linux with a graphical user interface (Ubuntu Desktop, Linux Mint, Rasperry Pi, etc.), you can also use the Selenium version, which automates most of the steps.

  1. Download this script
  2. Prepare environment and execute the script with python
  3. Follow the instructions in the script
  4. Save the refresh token (preferably in your password database as well)
  5. Enter the refresh token, instead of your Kia password, in the password field

Here is the procedure again as an example:

$ mkdir /tmp/kia && cd /tmp/kia
$ wget -O KiaFetchApiTokensSelenium.py https://gist.github.com/fuatakgun/fa4ef1e1d48b8dca2d22133d4d028dc9/raw/fe95ed7c02913f6277878a100458be78b794603d/gistfile1.txt
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip3 install selenium requests

$ python3 KiaFetchApiTokensSelenium.py 

Opening login page: https://idpconnect-eu.kia.com/auth/api/v2/user/oauth2/authorize?ui_locales=de&scope=openid%20profile%20email%20phone&response_type=code&client_id=peukiaidm-online-sales&redirect_uri=https://www.kia.com/api/bin/oneid/login&state=aHR0cHM6Ly93d3cua2lhLmNvbTo0NDMvZGUvP21zb2NraWQ9MjM1NDU0ODBmNmUyNjg5NDIwMmU0MDBjZjc2OTY5NWQmX3RtPTE3NTYzMTg3MjY1OTImX3RtPTE3NTYzMjQyMTcxMjY=_default

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

✅ Login successful! Element found.

✅ Your tokens are:

- Refresh Token: M2M2OG................................YOTG5
- Access Token: eyJhbGc.........................0_AijpHXp0yg
Cleaning up and closing the browser.

Windows

Credit to Puma7 for writing this windows guide.

Kia’s EU login flow now requires solving a Google reCAPTCHA. Because CAPTCHAs can’t be automated safely, most API clients (e.g., Home Assistant integrations) no longer accept your Kia password. Instead, you must log in once in a real browser and then use the resulting refresh token. This guide shows the simplest, working method on Windows using Python + Selenium.

Security: Treat your refresh token like a password. Anyone with it can access your Kia account and car.


Requirements

  • Windows 10/11
  • Google Chrome installed
  • Python 3.10+ (invoked as py on Windows)
  • Ability to open a normal Chrome window (you will solve reCAPTCHA manually)

No additional browser extensions are needed.


Quick Start (copy & paste)

Open PowerShell and run the following commands in order:

mkdir $env:TEMP\kia 2>$null; cd $env:TEMP\kia
py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install selenium requests webdriver-manager

# Script holen
iwr -UseBasicParsing -OutFile KiaFetchApiTokensSelenium.py `
  https://gist.github.com/fuatakgun/fa4ef1e1d48b8dca2d22133d4d028dc9/raw/fe95ed7c02913f6277878a100458be78b794603d/gistfile1.txt

# Starten
py .\KiaFetchApiTokensSelenium.py

What happens next

  1. A Chrome window opens with the correct mobile user agent required by Kia.

  2. Log in to your Kia account and solve reCAPTCHA.

  3. Once login succeeds, the script completes the OAuth flow and prints:

    • Refresh Tokenuse this as your “password” in clients (e.g., Home Assistant)
    • Access Token (usually not needed for clients)

Store the refresh token securely (password manager). Do not post or share it.


Use the refresh token in Home Assistant

  • Integration: Kia UVO / Kia Connect (EU)
  • Region: EU
  • Brand: Kia
  • Username: your Kia account email
  • Password: the refresh token from the script output
  • PIN: only if your integration asks for a vehicle PIN

Why we recommend this method

  • It’s user-friendly: you log in once in a real Chrome window, and the script handles the rest.
  • It’s reliable: avoids manual “code copy/paste” races (those short-lived codes expire quickly and often cause Invalid parameters errors).
  • No browser add-ons or UA tweaking required — the script sets everything.

Troubleshooting (focused on this method)

The Chrome window doesn’t open / driver error

  • Ensure Chrome is installed and up to date.

  • Some corporate environments block ChromeDriver downloads. Try on a home network or allow the download temporarily.

  • You can re-run:

    .\.venv\Scripts\Activate.ps1
    pip install --upgrade selenium webdriver-manager
    py .\KiaFetchApiTokensSelenium.py

I log in, but the script never prints tokens

  • Keep the Chrome window visible and complete the login fully (reCAPTCHA + credentials) until you land on Kia’s site.
  • If the script still doesn’t detect the redirect, close everything and run the commands again (a fresh session is quick).

Access denied / network errors

  • Ensure your network allows outbound connections to prd.eu-ccapi.kia.com:8080.
  • VPNs/proxies/firewalls may interfere; try a different network (e.g., mobile hotspot) if needed.

Lost the refresh token or suspect compromise

  • Treat it like a password: revoke sessions/log out from the Kia app and repeat the steps here to generate a new token.

Mac

Clone this wiki locally