Kia|EU stopped working again?
It looks like the login for Kia|EU isn't working again. Other integrations like Home Assistant work without issues.
- OS: Linux (Node Red)
- Bluelinky Version 10.0.0
- Region: EU
- Brand: kia
Yes, seems that KIA has integrated a captcha-system in their login. People elsewhere have figured something out: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/issues/855
Hope somebody here could help on this.
The python code could be ported to bluelinky....
I posted a preliminary version on my GitHub fork. If ppl using Kia but also Hyundai could test it, we might be able to have a fix soon. It is not using the normal kia app password but a refresh token. It can be grabbed as described in https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/1260#issuecomment-3216804763 There is no easy fix to this....
Hi Pierre, I've tried to get the refresh_token, but was not successful. I used the token_test.py from the other thread, but got the error back:
No 'code' in redirect query. Got URL:
https://idpconnect-eu.kia.com/error?status=400&error=Bad%20Request&error_description=Bad%20Request&ui_locales=&loginUrl
❌ Failed to retrieve tokens.
I've loged in Kia.de with captcha and also approved the sales-thing. How did you get the token? Thanks
I got it through another python program called "KiaFetchApiTokens.py". I ran it, used Chrome as instructed. The file was removed from the repo, but I'll attach it again.
Quite annoying that Kia changes it so often. I wonder how to go forward with these changes. @PierreLevres @Hacksore Are you willing to continuously update the login mechanism or should we look for other alternatives? Thx for your efforts btw! @PierreLevres If I try to build on your branch, it will currently work again?
Hey there, I've tried to compile (npm run build) the repo @PierreLevres, but I get an error:
VEHICLE_TYPE extends Vehicle = REGION extends REGIONS.US
~~~~~~~~~~~~~~~~~~~~~~~~~
40 ? AmericanVehicle
~~~~~~~~~~~~~~~~~~~~~
46 ? AustraliaVehicle
~~~~~~~~~~~~~~~~~~~~~~
47 : EuropeanVehicle
~~~~~~~~~~~~~~~~~~~~~
src/index.ts:65:9 - error TS2322: Type 'EuropeanController' is not assignable to type 'SessionController<BlueLinkyConfig>'.
65 this.controller = new EuropeanController(this.config as EuropeBlueLinkyConfig);
Any idea how to fix that? Thanks.
Hello everyone,
First of all, thank you very much for your great work on Bluelinky.
Unfortunately, I have not been able to log in to the EU region for several weeks because Kia Europe has introduced a captcha check.
My environment:
- Node.js v21.7.3
- npm v10.5.0
- Bluelinky v10.0.0
- Region: EU (Germany)
The login fails with HTTP 401 (Unauthorised).
I also tried ‘stampMode: DISTANT’, but that didn't help either.
I saw the workaround with ‘KiaFetchApiTokens.py’ in Issue #307.
Is there already work underway to integrate a long-term solution into Bluelinky itself, or is manually retrieving tokens currently the only option?
Please don't get me wrong, I don't want to put any pressure on you, I know that you work on Bluelinky exclusively in your spare time. But it would be helpful to know whether a solution might be coming in Bluelinky itself or whether ‘KiaFetchApiTokens.py’ will be the only option in the future.
Many thanks in advance for any information or updates.
Do you guys simply use this token instead of password, or do you also need the code from @PierreLevres ? I guess the 2nd?
I guess also the second, but I wasn't able to bring @PierreLevres code to life, see above.
I guess also the second, but I wasn't able to bring @PierreLevres code to life, see above.
Are you driving EU Kia or Hyundai? I found some bugs in the code. My fault. Code generated with Fetch library instead of Got. Now the Kia part is running fine in my HA/NodeRed environment, with the use of the captured token instead of the password.
Hey, that's great. I'm driving a Kia in Germany. Your code works like a charn. We "just" need the refresh token. Thank you so much. I'm using FHEM instead of HA, but written an MQTT integration for it. Works great. Thanks again, good work. Let's hop KIA is not changing the things to often.
I am using Node-Red. How can i use @PierreLevres code? Node-Red installs the official bluelinky everytime which does not work. I already have my refresh token.
download the repo. Run the build script (npm run build) and then overwrite the node-modules/bluelinky/dist folder with the one created by the npm run build script. Then restart node-red
Van: slewantoski @.> Verzonden: Wednesday, September 24, 2025 7:35:20 AM Aan: Hacksore/bluelinky @.> CC: PierreLevres @.>; Mention @.> Onderwerp: Re: [Hacksore/bluelinky] Kia|EU stopped working again? (Issue #307)
[https://avatars.githubusercontent.com/u/50290847?s=20&v=4]slewantoski left a comment (Hacksore/bluelinky#307)https://github.com/Hacksore/bluelinky/issues/307#issuecomment-3326611864
I am using Node-Red. How can i use @PierreLevreshttps://github.com/PierreLevres code? Node-Red installs the official bluelinky everytime which does not work. I already have my refresh token.
— Reply to this email directly, view it on GitHubhttps://github.com/Hacksore/bluelinky/issues/307#issuecomment-3326611864, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO7MCG3SNJ6KHTYBQS6CVUL3UIURRAVCNFSM6AAAAACEZZVNA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMRWGYYTCOBWGQ. You are receiving this because you were mentioned.Message ID: @.***>
Thank you very much @PierreLevres, that is working for me in Node-Red. I cloned your Repo with "git clone https://github.com/PierreLevres/Kuvork.git" I then had to install "rollup" and "rollup-plugin-typescript2" via npm, and the build succeeded with "npm run build". After replacing the dist-Folder with your built dist-folder in the node_module folder of "node-red-contrib-bluelinky" the Login with the Refresh Token is working!
As I understand it, the query should now work again with KiaFetchApiTokens.py.
Is there any documentation available that would enable a user with limited programming experience to successfully execute the query again?
I have previously run the Bluelinky script on a Raspi (Debian ‘light’) and sent the data to Fhem via MQTT.
If my beginner's question in this issue is completely wrong, I would appreciate a hint as to where I can ask it.
Thanks @PierreLevres, that worked.
As I understand it, PierreLevres' code should work at: https://github.com/PierreLevres/Kuvork
The password field does not require the previous password, but rather the refresh token generated with KiaFetchApiTokens.py via Chrome.
However, I still get the following error message: error: @EuropeController.login: sign in with EuropeanBrandAuthStrategy failed with error Error: @EuropeanBrandAuthStrategy.login: Could not extract authorisation code from redirect location.
What am I doing wrong? Can anyone give me a tip here?
Hi all, Hyundai driver here, and same issue about Captcha with bluelinky. I'm not sure I understood all the messages ? @PierreLevres should your fork works for Hyundai cars too ? Thanks !
No. This code only works for Kia since i dont have an Hyundai account to test. Op 14 okt 2025 om 22:42 heeft Kelyan PEGEOT SELME @.***> het volgende geschreven:kelyaenn left a comment (Hacksore/bluelinky#307) Hi all, Hyundai driver here, and same issue about Captcha with bluelinky. I'm not sure I understood all the messages ? @PierreLevres should your fork works for Hyundai cars too ? Thanks !
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@PierreLevres I managed to tweak your KiaFetchApiTokens.py to create my very own HyundaiFetchApiTokens.py and get refresh token for hyundai. But indeed your code is not working for Hyundai. I don't think we are very far from it. I'll see tomorrow if I can push a PR to your code for hyundai
Can confirm I got hyundai working. I'm submitting a PR to @PierreLevres fork very soon. For those who'd like to grab the Hyundai refresh token : HyundaiFetchApiTokens.py
@kelyaenn that's perfect timing as I'm getting my Inster from the dealership on friday! Thanks!
I merged the Hyundai code.
Van: Thomas B. @.> Verzonden: Wednesday, October 15, 2025 8:58:47 AM Aan: Hacksore/bluelinky @.> CC: PierreLevres @.>; Mention @.> Onderwerp: Re: [Hacksore/bluelinky] Kia|EU stopped working again? (Issue #307)
[https://avatars.githubusercontent.com/u/9037329?s=20&v=4]binderth left a comment (Hacksore/bluelinky#307)https://github.com/Hacksore/bluelinky/issues/307#issuecomment-3404867811
@kelyaennhttps://github.com/kelyaenn that's perfect timing as I'm getting my Inster from the dealership on friday! Thanks!
— Reply to this email directly, view it on GitHubhttps://github.com/Hacksore/bluelinky/issues/307#issuecomment-3404867811, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO7MCGZOADE54TQKRHV52R33XXWCPAVCNFSM6AAAAACEZZVNA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMBUHA3DOOBRGE. You are receiving this because you were mentioned.Message ID: @.***>
I merged the Hyundai code. …
There is a workaround for kia. But users would have to manually get their refreshkeys with captcha.
I merged the Hyundai code. …
There is a workaround for kia. But users would have to manually get their refreshkeys with captcha.
See @PierreLevres 's fork for this He indeed brought this to bluelinky
I feel a bit stupid. First I tried the instructions, but after browsing to the 'use default' checkbox, I could select many options, but not the ones that are suggested to be required. If they look alike, the versions are much older. (Like android 4.02, not 4.11 and so on) When I run the script and copy/paste the url, I get a french error message that the site can not be found. (Demande invalide. La page ne fonctionne pas.) I looked furtehr on the net and found a similar script for home-assistant, (On https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api) and with that script I got akey, but if I just copy it in the password field of de node-red blue linky properties, I can still not log in. Or do I still have to compile the code as describerd here? https://github.com/PierreLevres/Kuvork.git I expect username is still as before (e-mail address) and pincode no change. Node-red v4.1.1 Node.js v22.20 .0
I think I copied the latest version of bluelinkey in the right place, is there a file I can check the time/date on to make sure I am loading the latest version? As all others have success, I feel a dumbxxx.
@rboeije1 there are two steps
you need first to get your refresh token using HyundaiFetchApiTokens.py (or KiaFetchApiTokens.py) in this conversation according to your car brand.
I think your error comes from the user agent settings. Make sure you have the following (full text in the script) :
Once you have this, you need indeed to use the forked bluelinky version of @PierreLevres and use your refresh token from the previous step as password.
@kelyaen: I could not select that version in my chrome browser, but now I see I just have to paste it in the field under custom. That is why I used the other script that people use to get the token for home assistant, which is more convenient. If I look to the code, it uses the same client-ID and -secret, but a lightludifferent URL. As the resulting key did not work, I tried to revert back to HyundaiFetchApiTokens.py. With the help of your reply I got another refresh token and access token. (Not sure if I need that at one time, but I saved it anyway.) So now I downloaded the package of piere, but the directory structure looks different that the original bluelinky node. I merged the folders, overwriting existing files, restarted node-red, but no success so far. When I start node-red, I see the following error message: error: @EuropeController.login: sign in with EuropeanBrandAuthStrategy failed with error Error: @EuropeanBrandAuthStrategy.login: Could not extract authorization code from redirect location: https://idpconnect-eu.hyundai.com/auth/api/v2/user/oauth2/authorize?client_id=6d477c38-3ca4-4cf3-9557-2a1929a94654&redirect_uri=https://prd.eu-ccapi.hyundai.com:8080/api/v1/user/oauth2/redirect&nonce&state=ccsp&scope&response_type=code&connector_client_id=6d477c38-3ca4-4cf3-9557-2a1929a94654&connector_scope&orgHmgSid=&connector_session_key=xxxxxxxcaptcha=1 &reqUsername=xxxxxxx Is that an indication that eitehr the old or the new code is loaded?
@kelyaen: I could not select that version in my chrome browser, but now I see I just have to paste it in the field under custom. That is why I used the other script that people use to get the token for home assistant, which is more convenient. If I look to the code, it uses the same client-ID and -secret, but a lightludifferent URL. As the resulting key did not work, I tried to revert back to HyundaiFetchApiTokens.py. With the help of your reply I got another refresh token and access token. (Not sure if I need that at one time, but I saved it anyway.) So now I downloaded the package of piere, but the directory structure looks different that the original bluelinky node. I merged the folders, overwriting existing files, restarted node-red, but no success so far. When I start node-red, I see the following error message: error: @EuropeController.login: sign in with EuropeanBrandAuthStrategy failed with error Error: @EuropeanBrandAuthStrategy.login: Could not extract authorization code from redirect location: https://idpconnect-eu.hyundai.com/auth/api/v2/user/oauth2/authorize?client_id=6d477c38-3ca4-4cf3-9557-2a1929a94654&redirect_uri=https://prd.eu-ccapi.hyundai.com:8080/api/v1/user/oauth2/redirect&nonce&state=ccsp&scope&response_type=code&connector_client_id=6d477c38-3ca4-4cf3-9557-2a1929a94654&connector_scope&orgHmgSid=&connector_session_key=xxxxxxxcaptcha=1 &reqUsername=xxxxxxx Is that an indication that eitehr the old or the new code is loaded?
You have to do this: https://github.com/Hacksore/bluelinky/issues/307#issuecomment-3326626961 and this https://github.com/Hacksore/bluelinky/issues/307#issuecomment-3327070474.