tesla-ts icon indicating copy to clipboard operation
tesla-ts copied to clipboard

Error: Request failed with status code 400

Open cycl0ne opened this issue 1 year ago • 1 comments

when using your example: const api = new TeslaAPI(username, password); api.vehicles().then((vehicles)=> { console.log('my vehicles: ', vehicles); // get the first vehicle! const vehicle = vehicles[0]; }) .catch((error) => console.warn(error));

i get:

Error: Request failed with status code 400 at createError (/home/poweros/tibberts/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/poweros/tibberts/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/poweros/tibberts/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1376:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {

cycl0ne avatar Nov 14 '23 20:11 cycl0ne

to give more input: data: { response: null, error: 'Endpoint deprecated: Please update your App.', error_description: ''

Seems you need to update your code: https://tesla-api.timdorr.com/api-basics/authentication

cycl0ne avatar Nov 14 '23 21:11 cycl0ne