Skip to content

Kia EU headless login succeeds but token exchange always returns HTTP 403 #11

Description

@device2000

Environment

  • Country: Germany
  • Vehicle: Kia (EU)
  • ioBroker Bluelink Adapter: 3.1.28
  • Windows 11
  • Python 3.14
  • Latest bluelinktoken.py from main branch
  • Latest curl_cffi
  • Smartphone Hotspot tested (same result)

Description

The headless login works almost completely.

The script

  • establishes the session
  • fetches the RSA public key
  • encrypts the password
  • signs in successfully
  • receives a valid authorization code

Only the last step fails.

[1/4] Loading authorize page...
✅ Session established

[2/4] Fetching RSA public key...
✅ Password encrypted

[3/4] Signing in...
✅ Authorization code received

[4/4] Exchanging code for tokens...

❌ Token exchange failed: HTTP 403

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>

The Kia Connect App works normally.

Login with username/password is successful.

The authorization code is received successfully.

Only exchanging the authorization code for refresh/access tokens fails.

I also tested

  • different Internet connection (smartphone hotspot)
  • fresh login
  • logout/login in Kia Connect App
  • latest version from GitHub
  • latest Python packages

Result is always identical.

Could Kia have changed the token endpoint or additional headers/cookies now be required during the token exchange?

Thank you for your great work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions