Getting Started

Registering OAuth clients

You can register OAuth clients with Tapkey using our self-service registration page.

OAuth clients are registered under an owner account in Tapkey's eco-system. After registration, an owner account will be created when registering your first lock.

Don't have a locking device?

You can still create an owner account without registering a lock. Click here to be redirected to Tapkey Web Portal and proceed logging in with your account. Next, click on the drop down menu in the navigation drawer and you should see a button "Create own locking system". Click there and you are good to go!

List Locks

After registering a new OAuth client, listing a user's locks can be easily done using the Tapkey Management API. After obtaining an access token via OAuth, a user's owner accounts can be retrieved using the GET /owners operation.

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

var ownerAccountsTask = client.GetStringAsync("");
var json = await ownerAccountsTask;
var ownerAccounts = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(json);

After that, ownerAccount 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(
var json = await boundLocksTask;

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

At this point, boundLocks contains a list of bound locks for the selected owner account. Information about the respective locks is delivered as defined in the GET /owners/{ownerAccount}/boundlocks operation's response description below.

// 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"]}");

Runnable Example Available

A complete, runnable console application that prints a list of locks can be found in the Tapkey Management API .NET samples repository on GitHub.