Comments (1)
@dixkxnsks If you switch from "EU" to "US" region are you still encountering this error trying to access vehicles = user.vehicles()
?
The new vehicles endpoint requires the locale
and countryCode
parameters to be set in the request headers. The country code should be fine but the locale may be incorrect.
By default I have the locale set to en-US
, which is probably why you are experiencing an error making a request to get the user vehicles. (See below)
/src/Api/Api.ts
constructor(accessToken: string, region: string, locale = 'en-US') {
const regions = {
US: '71A3AD0A-CF46-4CCF-B473-FC7FE5BC4592',
CA: '71A3AD0A-CF46-4CCF-B473-FC7FE5BC4592',
EU: '1E8C7794-FF5F-49BC-9596-A1E0C86C5B19',
AU: '5C80A6BB-CF0D-4A30-BDBF-FC804B5C1A98',
};
const countryCode = {
US: 'USA',
CA: 'CAN',
EU: 'EUR',
AU: 'AUS',
};
this.headers = {
'auth-token': accessToken,
Accept: '*/*',
'Accept-Language': 'en-US',
'User-Agent': 'FordPass/24 CFNetwork/1399 Darwin/22.1.0',
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip, deflate, br',
'Application-Id': regions[region],
locale,
countryCode: countryCode[region],
};
}
from connected-car-python-sdk.
Related Issues (20)
- Add Authorization Code Grant Type
- Exchange refresh token does not have a valid grant_type
- Recalls resource not found HOT 1
- Add application integration tests to validate API connection and methods
- Create GitHub actions to run unit/integration tests on push to branch
- Add recall status functionality HOT 1
- 401 - Authorization Issue
- Error 429 'Too Many Requests' HOT 1
- vehicle.capability() returning error HOT 1
- Authentication quit working HOT 4
- 502 Gateway error HOT 2
- Exception: Unable to login, missing location redirect HOT 7
- Add the ability to enable/disable charging
- Ford Account Lockout HOT 6
- Authentication changed? HOT 1
- connectedcar.exceptions.SyncException: Unexpected error HOT 3
- Max retries exceeded HTTPSConnectionPool HOT 1
- Fordpass for India
- Problem obtaining an Access Token for AU Client HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connected-car-python-sdk.