Giter Site home page Giter Site logo

bmw-api-wrapper's Introduction

Introduction

This is a internal API exploratory project aimed at uncovering APIs exposed by BMW, Mini Cooper, & related brands. As with any project of this type, it's a continuous work-in-progress.

If you have discovered an issue with the HTTP collection, or found an endpoint not listed or documented here, please open a PR or new Issue.

This project is focused on supporting the North American APIs, but will ideally work with european and asian APIs as well. Generally speaking, it's just a minor URL change for other markets.

Read on to understand more about this project.

What is ConnectedDrive?

Almost every modern BMW, Mini, Rolls Royce, or Toyota Supra (2020+) is equipped with a product called ConnectedDrive or Connect. This featureset allows native connectivity to your vehicle through your smartphone or via other channels (websites, services, etc). In some cases, generally with newer models, ConnectedDrive allows for insights into your current vehicles status (charging/gas, mileage, location), as well as remote control (unlock/horn/remotestart).

ConnectedDrive has a plethora of hidden web-APIs that is used to receive information or dispatch commands to your vehicle remotely. The goal of this project is to explore all of those endpoints, document how to use them, and to provide a interface for doing so (i.e. Postman or Thunder Test).

Due to the fact that I can't possibly test against every single BMW on the road, it should be understood that the documentation may not be 100% accurate, but feel free to contribute any knowledge or corrections you have.

Read more

What is My Garage

My Garage is a facet available across BMW brands to access information about your vehicle through a web interface. Similar to the BMW ConnectedDrive situation, each brand has it's own interface, but it's generally supported by the same backend. The My Garage service is included in this repo because it offers additional endpoints and datasets not available solely through the ConnectedDrive channels. The authentication mechanisms are identical between ConnectedDrive and My Garage.

Mini Cooper My Garage

BMW My Garage

Getting Started

ThunderClient / Postman

There are several HTTP collections. A brief description of each is below.

  • VCS / My Garage โ€“ The primary collection with API endpoints that relate to Vehicle Communication Service (VCS) and My Garage. They use the same authentication mechanisms.
  • Inventory โ€“ A separate collection that holds requests relating to the used vehicle inventory searches.

Setup

To use the Thunder Client (Visual Studio Code extension) or Postman HTTP collection, see the .vscode folder.

You can import the collection via the Thunder Client GUI.

Rename .env.example to .env and update the following placeholders to your values

  • email
  • password
  • vin

Do not update ocp-apim-subscription-key. If you're using Thunder Client, link the .env to your Thunder Client environment.

You may also need to link the utils.js helper functions to the Thunder Client collection. To do so,

  1. Import the collection
  2. Right click the "Collection" folder and press settings
  3. Click the "Scripts" tab and import the utils.js file

Usage

To perform the authentication process, run the Authentication folder requests in order

  1. OAuth Config
  2. Authenticate (1/2)
  3. Authenticate (2/2)
  4. Token

To perform a relogin with a refresh token (after you have already completed the above), run the following requests in order

  1. OAuth Config Optional
  2. Refresh

These requests will create or update the environment variables that are used by the rest of the collection.

CLI Client

To be completed.

Resources

The resources below were used as a reference during creation of this project. Big thanks to them.

Disclosure

This project is not affiliated with BMW, Mini Cooper, or any other related brand. It's likely that usage of this project is against a TOS somewhere. Use at your own risk and see the LICENSE.

bmw-api-wrapper's People

Contributors

amattu2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.