Skip to main content

BlockID Developer SDK

The BlockID Developer SDK allows you to easily integrate BlockID services into your development platform. We currently support NodeJS, PHP, and Java.

Getting Started

In order to configure and use the SDK, you will need the following information from your BlockID Developer Dashboard:

  • Your Email Address
  • Your License Key
  • Tenant DNS
  • Community Name
  • IDVerify API Key(dvcId)

Install the BlockID SDK

To get started, install the BlockID SDK for your preferred development environment. The BlockID SDK contains all the necessary libraries and functions needed for secure communication between the BlockID API and user machines.

Install the BlockID SDK for NodeJS

In your project directory, create or edit your package.json file to include the SDK as a dependency:

package.json
{
"name": "project",
"version": "0.0.0",
"private": true,
"dependencies": {
"blockid-nodejs-helpers": "git+https://github.com/1Kosmos/nodejs-helper-files#v2.0.03"
},
"description": "My project"
}

Next open a terminal, navigate to your project directory, and execute the following command to install the NodeJS SDK :

npm install
Note

After installation, the BlockID SDK can be found in the <project root>/node_modules/blockid-nodejs-helpers folder

If you would prefer to install the NodeJS and its dependencies yourself, the git repo can be found at https://github.com/1Kosmos/nodejs-helper-files

Configure the SDK with your Tenant and License Key

Configure the SDK with your tenant information and license key

Parameters

  • dns: tenant DNS
  • communityName: tenant community name
  • licenseKey: BlockID license key

initialization Format

Configuring the BlockID SDK for NodeJS

  • Initialize the SDK
const loaded = await bidsdk.setupTenant({dns: "<your tenant DNS>", communityName: "<your community name"}, "<licenseKey>")`;

Example SDK Initialization

Please note:

These are just examples - you will need to replace the dummy information included in the examples below with your own tenant information and license key

Example NodeJS SDK Initialization

const BIDSDK = require("blockid-nodejs-helpers/BIDSDK.js");
const loaded = await BIDSDK.setupTenant(
{ dns: "developer.1kosmos.com", communityName: "devx" },
"0005c9f8-1918-40be-aa00-e319043f7eee"
);