Skip to content

KiaUvoApiIN (India, Hyundai): signin returns {"step": 5, "upgrade": false} instead of redirectUrl, causing "Login Failed" on every version #1271

Description

@Jcube101

Environment

  • Library: hyundai_kia_connect_api
  • Versions tested: 4.10.3 (pinned) and 4.23.0 (latest) — same failure on both
  • Region: region=6 (India), brand=2 (Hyundai)
  • Vehicle: Hyundai Exter, registered India

What I expected

VehicleManager.check_and_refresh_token() should log in successfully with valid username/password/pin, as it has done previously (confirmed working as recently as April 2026 on this same account).

What happens

login() raises AuthenticationError("Login Failed"). With logging.basicConfig(level=logging.DEBUG), the underlying cause is visible in KiaUvoApiIN._get_authorization_code_with_redirect_url:

DEBUG:hyundai_kia_connect_api.KiaUvoApiIN:hyundai_kia_connect_api - Sign In Response: {'step': 5, 'upgrade': False}
DEBUG:hyundai_kia_connect_api.KiaUvoApiIN:hyundai_kia_connect_api - get_authorization_code_with_redirect_url failed

The code at KiaUvoApiIN.py (_get_authorization_code_with_redirect_url) does:

response = requests.post(url, json=data, headers=headers, cookies=cookies).json()
parsed_url = urlparse(response["redirectUrl"])   # KeyError here — no redirectUrl in the response

Instead of a redirectUrl, the /api/v1/user/signin POST now returns {"step": 5, "upgrade": false}. The KeyError is swallowed by a broad except Exception in login(), which just re-raises as a generic AuthenticationError("Login Failed") with no detail.

Question

Does anyone know what "step": 5 corresponds to in the India Bluelink signin flow? It looks like a multi-step auth flow (possibly a new mandatory OTP/verification step Hyundai added server-side for India accounts) that isn't implemented in KiaUvoApiIN. This account previously logged in successfully via this library as recently as April 2026, so this looks like a new server-side requirement rather than a credentials/account problem.

Happy to help test a fix if someone can point to what step 5 expects (e.g. an OTP submission endpoint), since I don't have visibility into what the official app sends after this response.

Repro steps

import logging
logging.basicConfig(level=logging.DEBUG)
from hyundai_kia_connect_api import VehicleManager

vm = VehicleManager(region=6, brand=2, username="<redacted>", password="<redacted>", pin="<redacted>")
vm.check_and_refresh_token()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions