Generate a URL to initiate the account connection flow, which allows users to connect their accounts. The generated URL is active for a one-hour period. If not authenticated within this timeframe, the link will become invalid.
After the connection flow is completed, the device owner is redirected to the provided return URL with the following parameters:
result indicating success or failure.accountId representing the ID of the connected account.For further customization and integration details, consider the following resources:
You can also connect a single vehicle using the VIN upload flow. Pass the VIN, and (if available) the model and model year. This will generate a consent flow link that’s dedicated to uploading a single vehicle.
The access token received from the authorization server in the OAuth 2.0 flow.
The url the user is redirected to at the end of the consent flow
1List of scopes that the application requires access to
1vehicle:all, vehicle:charging_history, vehicle:driving_behavior, vehicle:location_history, vehicle:telemetry, vehicle:information, vehicle:commands, battery:all, battery:telemetry, geofences:all, geofences:read, geofences:write Only show these device types in the consent flow. If only one device is selected, the device selection page is skipped.
1All supported device types
VEHICLE, BATTERY, CHARGER, INVERTER, HEAT_PUMP Set the language used in the the consent flow. The default is English.
en-GB, de-DE, fr-FR, nl-NL This is for when a make can be connected via multiple methods. For example, if the make is BMW, the user can connect via the BMW Energy API (for smart charging) or via BMW Cardata (for other vehicle data).
The latitude of the charger location that the vehicle will be charging at. This is passed in specific cases to the OEM's Portal when the consent flow runs (currently only for BMW), to make it easier for the user to select their charger location, which in turn is needed (currently only for BMW) to restrict when start / stop charge commands can be sent.
The longitude of the charger location that the vehicle will be charging at. This is passed in specific cases to the OEM's Portal when the consent flow runs (currently only for BMW), to make it easier for the user to select their charger location, which in turn is needed (currently only for BMW) to restrict when start / stop charge commands can be sent.
The ISO 3166-1 alpha-2 country code (e.g. DE, GB, US etc.) of the account's country. This is required when it is necessary to fetch the key specifications (model, model year, trim, battery capacity etc.) for vehicles in the account.
Only show these makes of device in the consent flow
Implemented makes enum
BMW, MINI, HYUNDAI, KIA, TESLA, AUDI, SEAT, SKODA, VOLKSWAGEN, CUPRA, VOLVO, ENPHASE, MERCEDES, TESLA ENERGY, ABARTH, ALFA ROMEO, CHRYSLER, CITROEN, DODGE, DS AUTOMOBILES, FIAT, JEEP, LANCIA, MASERATI, OPEL, PEUGEOT, RAM, VAUXHALL, STELLANTIS, FORD, NISSAN, POLESTAR Defines the validity period of the authentication URL in seconds. Defaults to 3600, with a range between 3600 seconds (1 hour) and 1209600 seconds (2 weeks). Once expired, the URL becomes invalid and cannot be used.
3600 <= x <= 1209600Defines the geographic region for the account connection, directly influencing which OEM-specific API endpoint will be used for the connection. For OEMs with distinct APIs across regions, this setting ensures the correct regional API is utilized. The default is Europe.
NORTH_AMERICA, EUROPE The VIN to connect, if connecting via the VIN upload flow.
The model to connect, if connecting via the VIN upload flow.
The model year to connect, if connecting via the VIN upload flow.
Successful Response
The URL to redirect the user to for authentication through the connect flow.