Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (46 sloc) 1.88 KB

Log Export Add-On

This exemplary Tapkey add-on demonstrates how to use the Tapkey Management API to build a web application allowing users to download a CSV of their Tapkey access log. The example uses OAuth2 (Authorization Code Flow) to authenticate against the Tapkey Management API.

The application is written in Python 3, using Flask as web framework.

You can find this application running on

Developer Setup

All code can be found in You can install dependencies using

$ pip install -r requirements.txt

You may want to use venv.


You need a Tapkey Management API client (Authorization Code Flow) with the following permissions:

  • Core Entities: ReadOnly
  • Logs: ReadOnly
  • Owners: ReadOnly

Use https://<your-domain>/tapkey/callback as redirect URI, e.g. during development.

See for more information about Authentication, the Tapkey Management API and how to set up your own API clients.

The following environment variables are required:

APP_SECRET_KEY= # a random string
TAPKEY_CLIENT_ID= # your client id
TAPKEY_CLIENT_SECRET= # your client secret


Run the application

$ ... venv\Scripts\python.exe -m flask run --port 3000

and navigate to in your browser.

You will be forwarded to where you can authenticate as a Tapkey user and authorize the add-on to access your Tapkey account. Afterwards, you can choose to download access logs as CSV for each of your registered locking devices.

You can’t perform that action at this time.