Get data from your Renault electric vehicle
And interact with its API
2 min readJul 19, 2024
Use your credential to login
curl --location 'https://accounts.eu1.gigya.com/accounts.login' \
--form 'ApiKey="3_js8th3jdmCWV86fKR3SXQWvXGKbHoWFv8NAgRbH7FnIBsi_XvCpN_rtLcI07uNuq"' \
--form 'loginID="email@gmail.com"' \
--form 'password="xxxxx"'
Get the session cookieValue from the reply
{
"sessionInfo": {
"cookieName": "gac_",
"cookieValue": ""
}
}
Get your JWT Token
curl --location 'https://accounts.eu1.gigya.com/accounts.getJWT' \
--form 'login_token=""' \
--form 'ApiKey="3_js8th3jdmCWV86fKR3SXQWvXGKbHoWFv8NAgRbH7FnIBsi_XvCpN_rtLcI07uNuq"' \
--form 'fields="data.personId,data.gigyaDataCenter"'
{
"id_token": ""
}
Get your Account Info
curl --location 'https://accounts.eu1.gigya.com/accounts.getAccountInfo' \
--form 'login_token=""' \
--form 'ApiKey="3_js8th3jdmCWV86fKR3SXQWvXGKbHoWFv8NAgRbH7FnIBsi_XvCpN_rtLcI07uNuq"'
{
"data":
{
"personID":""
}
}
Get your Person ID
Use your personID to get your accountID
curl --location 'https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/{personID}?country=IT' \
--header 'Content-Type: application/vnd.api+json' \
--header 'apikey: YjkKtHmGfaceeuExUDKGxrLZGGvtVS0J' \
--header 'x-gigya-id_token: {jwt token}'
Now you have:
- an account ID
- a JWT token
From now on we will use a different endpoint
Get the VIN of your vehicles
curl --location --request GET 'https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/{account_id}/vehicles?country=IT' \
--header 'Content-Type: application/vnd.api+json' \
--header 'apikey: YjkKtHmGfaceeuExUDKGxrLZGGvtVS0J' \
--header 'x-gigya-id_token: {jwt token}' \
--data '{
"country": "it_IT"
}'
Get data of your vehicle
curl --location --request GET 'https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v2/cars/{vin}/battery-status?country=IT' \
--header 'Content-Type: application/vnd.api+json' \
--header 'apikey: YjkKtHmGfaceeuExUDKGxrLZGGvtVS0J' \
--header 'x-gigya-id_token: {jwt token}' \
--data '{
"country": "it_IT"
}'
And voilà you can read your vehicle data
{
"data": {
"id": "VXXXXXXXXXXXXXXX",
"attributes": {
"timestamp": "2024-07-19T14:41:06Z",
"batteryLevel": 100,
"batteryAutonomy": 41,
"plugStatus": 1,
"chargingStatus": 0.2,
"chargingRemainingTime": 65
}
}
}
Telegram BOT
I implemented this to interact with my Renault vehicle via telegram
Resources
All the API calls are documented here https://renault-api.readthedocs.io/en/latest/endpoints.html#vehicle-data-endpoints
A good blogpost https://muscatoxblog.blogspot.com/2019/07/delving-into-renaults-new-api.html
Some repo where I got inspiration:
- https://github.com/hacf-fr/renault-api
- https://github.com/bkogler/renault-api-lite