connected-car-node-sdk icon indicating copy to clipboard operation
connected-car-node-sdk copied to clipboard

Status is returning forbidden

Open ryancornia opened this issue 8 months ago • 9 comments

When calling status on a vehicle, a 403/forbidden response is being returned from Ford.

A simple example:

import connectedcar from 'connected-car';

const client = connectedcar.AuthClient('9fb503e0-715b-47e8-adfd-ad4b7770f73b'); 

const token = await client.getAccessTokenFromCredentials({
  username: '*****',
  password: '****',
});

const refreshToken = await client.getAccessTokenFromRefreshToken(token.getRefreshToken());
const user = connectedcar.User(token.getValue());
const vehicles = await user.vehicles();

const vehicleList = []; // Array of vehicles

for (let userVehicle of vehicles) // For each user vehicle
  vehicleList.push(userVehicle['VIN']);

let currentVehicle = connectedcar.Vehicle(vehicleList[0], token.getValue());

console.log(currentVehicle);
const status = await currentVehicle.status();
console.log(status);

ryancornia avatar Oct 17 '23 12:10 ryancornia

Ford is using a new API and is blocking requests to the old API this project is using. Fortunately, it can be fixed.

brandon-grant avatar Oct 19 '23 15:10 brandon-grant

how can it be fixed @brandon-grant

meilechwieder avatar Nov 23 '23 22:11 meilechwieder

is there any js package that implements the new API?

meilechwieder avatar Nov 23 '23 22:11 meilechwieder

Hi all,

Working on getting this updated.

ianjwhite99 avatar Nov 27 '23 16:11 ianjwhite99

In looking around a bit, it appears that Ford is changing their FordPass application in favor of their new publicly facing api that will be released at some point in the future. I'll see what I can do to get this library patched up in the meantime.

ianjwhite99 avatar Nov 27 '23 16:11 ianjwhite99

In looking around a bit, it appears that Ford is changing their FordPass application in favor of their new publicly facing api that will be released at some point in the future. I'll see what I can do to get this library patched up in the meantime.

I've attached a down and dirty solution I put together for myself. OAuth2Client.txt

brandon-grant avatar Nov 27 '23 16:11 brandon-grant

In looking around a bit, it appears that Ford is changing their FordPass application in favor of their new publicly facing api that will be released at some point in the future. I'll see what I can do to get this library patched up in the meantime.

I've attached a down and dirty solution I put together for myself. OAuth2Client.txt

Thanks Brandon. That should help speed things up a bit.

ianjwhite99 avatar Nov 27 '23 16:11 ianjwhite99

@brandon-grant thank you very much!! Can you share a piece of (sample) code on to start the car, for example, with your OauthClient code that you shared?

meilechwieder avatar Nov 27 '23 20:11 meilechwieder

any update on this one? been following this for a while...

iProDeveloping avatar Mar 12 '24 17:03 iProDeveloping