Playground biometrics demo BioID home page

BWS Management API

The BWS Portal is the place where you manage your subscription, clients and keys and where you can analyze your usage and inspect the bookkeeping- and log-entries generated by your clients.

The BWS Portal internally uses a Management API to get access to the required data. Parts of this Management API have been made publicly available at https://bwsportal.bioid.com/api/. This API is intended to be used with scripting, but you can also visualize and interact with the API using the Swagger UI.

The BWS Management API of the new Portal replaces the Management API of the classic Portal. For clarity the new API currently provides much less functionality than the classic one. Anyway, on demand, additional functionality can be made available in the future.

Authentication

To call into the BWS Management API you have to authenticate yourself with your email address and API key. You find the email address you used with the BWS Portal by clicking on the user symbol in the top right corner of the BWS Portal. When you click on your email address, you also find the API key you can use to authenticate.

Note that you never use your account password with our BWS APIs!

Although the BWS Management API supports basic access authentication using a Basic Authorization header (with your emaill address and API key), we highly recommend to use Bearer authentication with a JSON Web Token (JWT). To generate a valid JWT from your emial address and API key, we provide a little tool you can download from the BWS Tools page.

Examples

We provide some PowerShell sample code here. Of course you can use other shells and run tools like curl as well. The used jwt tool is availbale here for Linux and Windows.

# create a token using the jwt tool
$subject = "your email address"
$key = "your API key"
$token = ./jwt.exe --sub $subject --key $key

# use generated JWT for Bearer authentication
$headers = @{"Authorization" = "Bearer " + $token}

# call into an API, e.g. to fetch the subscription IDs you have access to:
$response = Invoke-WebRequest -Uri "https://bwsportal.bioid.com/api/subscriptions" -Headers $headers
$response.Content | ConvertFrom-Json

# or fetch the daily usage of subscription xyz:
$response = Invoke-WebRequest -Uri "https://portal.bioid.com/api/usage/daily/subscription/xyz" -Headers $headers
$response.Content