Skip to content

Logging into Kia US does not appear to be working #293

@jeremyakers

Description

@jeremyakers

Describe the bug
I installed Bluelinky via npm and used the example JavaScript to test:

const { BlueLinky } = require('bluelinky');

const client = new BlueLinky({
  username: "<redacted>>",
  password: "<redacted>>",
  brand: "kia",
  region: "US",
  pin: "",
});

client.on("ready", async () => {
  const vehicle = client.getVehicle("<redacted>");
  const response = await vehicle.lock();
  console.log(response);
  console.log("Got to end")
});

I have double and triple checked the username and password, even copy pasting them into the login screen at owners.kia.com to make sure they work when I log in via the regular website: They work fine there. But when I use the same credentials with the Bluelinky code above: The console.log(response); line pukes out a massive blob of HTML code and then follows up with this on the console:

Y [ManagedBluelinkyError]: @AmericanController.login: [403] Forbidden on [POST] https://api.owners.kia.com/apigw/v1//v2/ac/oauth/token - <more HTML here>
    at q (/Users/jakers/node_modules/bluelinky/dist/index.cjs:2:17144)
    at Q.<anonymous> (/Users/jakers/node_modules/bluelinky/dist/index.cjs:2:19851)
    at Generator.throw (<anonymous>)
    at a (/Users/jakers/node_modules/bluelinky/dist/index.cjs:2:658)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Me instance at:
    at Me.<anonymous> (/Users/jakers/node_modules/bluelinky/dist/index.cjs:2:109544)
    at Generator.throw (<anonymous>)
    at a (/Users/jakers/node_modules/bluelinky/dist/index.cjs:2:658)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  source: GotError [HTTPError]: Response code 403 (Forbidden)
      at EventEmitter.<anonymous> (/Users/jakers/node_modules/got/source/as-promise.js:74:19)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    host: 'api.owners.kia.com',
    hostname: 'api.owners.kia.com',
    method: 'POST',
    path: '/apigw/v1//v2/ac/oauth/token',
    socketPath: undefined,
    protocol: 'https:',
    url: 'https://api.owners.kia.com/apigw/v1//v2/ac/oauth/token',

<rest of output trimmed as it was quite large and mostly repetitive of the above>

I noticed the URL it appears to be accessing is

https://api.owners.kia.com/apigw/v1//v2/ac/oauth/token

Which looks off to me given it shows v1 immediately followed by a v2?

Usefull info(please complete the following information):

  • OS: MacOS
  • Bluelinky Version:
% npm list
jakers@ /Users/jakers
└── bluelinky@9.1.0
  • Region: US
  • Brand: Kia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions