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. However, when initializing the SDK, you have the option to override certain default behaviors and specify additional options.
See all possible configurations when initializing the SDK.
The returned SDK has the following properties
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: {
limit: 10,
}
});