Initializing the SDK

Developer Chat Apache 2.0 License Typescript Web


In order to use the JS SDK, you'll first need to initialise it with your unique application ID. You can get yours by filling out the registration form here.

By default, the SDK will point to the production environment of digi.me, but when initialising the SDK, you have the ability to override some default behaviour and specify some options.

Configuration Options

See all possible configurations when initializing the SDK.

Returns

The returned SDK has the following properties

Examples

The most basic initialization:

Using ES6 modules

import { init } from "@digime/digime-sdk-nodejs";

const sdk = init({ applicationId: <my-unique-application-id> });

Using CommonJS

const { init } = require("@digime/digime-sdk-nodejs");

const sdk = init({ applicationId: <my-unique-application-id> });

If you'd like to specify retry options for the SDK:

import { init } from "@digime/digime-sdk-nodejs";

const sdk = init({
applicationId: <my-unique-application-id>,
retryOptions: {
retries: 10,
}
});

Please see here for all possible retry options.

Generated using TypeDoc