v1

latestOpenAPI 3.1.02026-08-0450121252.8 KB
Accounts

Action Connect

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:

  • See the Scopes documentation for information on how to utilize scopes in your integration.
  • See the Regions documentation for guidelines on setting geographic regions.

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.

Possible Codes in Error Response (see Errors for error response schema and meaning of codes):

  • AUTHENTICATION_ERROR
  • DEVICE_LIMIT_REACHED
  • NOT_PERMITTED
  • REQUEST_VALIDATION_ERROR
  • SERVER_ERROR
  • UNSUPPORTED_OEM
post/v1/accounts:connect

Request body

returnUrlstring uri nullable

The url the user is redirected to at the end of the consent flow

scopesScopeEnum[] required

List of scopes that the application requires access to

locale'en-GB' | 'de-DE' | 'fr-FR' | 'nl-NL'
integrationMethod'BMW_ENERGY_API'
countryCodestring nullable

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.

makesMakeEnum[] nullable

Only show these makes of device in the consent flow

deviceTypesDeviceTypeEnum[] required

Only show these device types in the consent flow. If only one device is selected, the device selection page is skipped.

urlExpirationinteger nullable

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.

region'NORTH_AMERICA' | 'EUROPE'
vinstring nullable

The VIN to connect, if connecting via the VIN upload flow.

modelstring nullable

The model to connect, if connecting via the VIN upload flow.

modelYearinteger nullable

The model year to connect, if connecting via the VIN upload flow.

Response

Successful Response

authenticationUrlstring required

The URL to redirect the user to for authentication through the connect flow.