API Keys

You need to submit an API key with every request. The first one (we call it default key) is generated automatically. Different applications can use different API keys. You can manage your keys here.

Authentication

To use the API key, you can have two options:

A) HTTP Header

You can set the API-Key HTTP Header with every request using the Bearer format:

  GET /v4/transit/departures.json?station_id=vesputi-station-OW_67EIOJqGwBhxvl5WieXQQdPRQPBOb5yPYyPSF6ug&max_departures=10
  Authorization: Bearer abcde-fghij-klmno-pqrs-zuvw
  Accept: application/json, text/plain, */*
  Origin: https://duisburg.vesputi.com
  Accept-Encoding: gzip, deflate, br
  Host: api.themobilitybox.com
  Accept-Language: de-de
  Referer: https://duisburg.vesputi.com/
  Connection: keep-alive
  

B) URL Parameter

You can also directly attach the API key as a URL parameter, like this:

https://api.themobilitybox.com/v4/transit/departures.json?station_id=vesputi-station-OW_67EIOJqGwBhxvl5WieXQQdPRQPBOb5yPYyPSF6ug&max_departures=10&api_key=abcd-efgh-hijk-lmnop

If end users have direct access to these URLs, it is probably best to use option A and set the HTTP header.