Skip to content
Tapkey CSV Export Sample Application
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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.