Tapkey for Vertical Solutions.

How to get started with Tapkey.

Getting Started

The Tapkey API helps you to connect external applications with Tapkey access products. Please follow the next steps to get started.

Registration

In order to use our API - whether to connect an existing application or develop a new product for Tapkey - you need to register first. Necessary information is being exchanged in order to authenticate your software with us. Register now

Authentication

Tapkey offers an authentication infrastructure that is compatible with OAuth 2.0. Please have a look at the Tapkey OAuth Guide for further information regarding the authentication process at Tapkey. Go to Tapkey OAuth Guide

Examples

We have set up some sample applications in different technologies in order to demonstrate the different areas of use. All examples are publicly available on Github. The following list provides an overview on the currently available examples according to technology.

API Documentation

The Tapkey API provides an overview of the architecture and data modell besides the general interface documentation. In addition, all operations may be tested in real-time in a browser.

Example: List access products

Note

Please visit the example library for C# on Github for the complete source code of the example.

Listing a User’s locking devices can be easily done using the Tapkey API. After obtaining an access token via OAuth, a User’s owner accounts can be retrieved using the GET https://my.tapkey.com/api/v1/owners operation.

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _accessToken);

var ownerAccountsTask = client.GetStringAsync("https://my.tapkey.com/api/v1/owners");
var json = await ownerAccountsTask;
var ownerAccounts = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(json);

After that, ownerAccounts contains a list of Owner Accounts for the current User. If present, an Owner Account can be chosen from that list in order to query Bound Locks.

// For demo purposes, just take the first owner account...
var ownerAccountId = ownerAccounts.First()["id"];
// ... and query for bound locks
var boundLocksTask = client.GetStringAsync(
    $"https://my.tapkey.com/api/v1/owners/{ownerAccountId}/boundlocks");
var json = await boundLocksTask;

var boundLocks = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(json);

At this point, boundLocks contains a list of bound locking devices for the selected Owner Account. Information about the respective locking devices is delivered as defined in the GET /owners/{ownerAccount}/boundlocks operation’s response description as outlined in the API documentation.

// Print a list of all bound locks
foreach (var boundLock in boundLocks)
{
    var lockInfo = new StringBuilder();
    lockInfo.AppendLine($"Lock ID: {boundLock["id"]}");
    lockInfo.AppendLine($"Title: {boundLock["title"]}");
    lockInfo.AppendLine($"Description: {boundLock["description"]}");
    lockInfo.AppendLine($"Lock is active: {boundLock["active"]}");
    lockInfo.AppendLine($"Binding date: {boundLock["bindDate"]}");
    Console.WriteLine(lockInfo);
}