Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (54 sloc) 3.04 KB

Developer Chat Apache 2.0 License Typescript Web


Initialising the SDK

In order to use the JS SDK, you'll first need to initialise it. 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.

The create SDK function has the following signature:

const init = (sdkOptions?: Partial<DMESDKConfiguration>);

Returns the configured SDK object

The SDK object contains the following functions:

sdkOptions: DMESDKConfiguration Configuration that can be optionally passed in to override default SDK behaviours.

Exceptions

ParameterValidationError

DMESDKConfiguration

Options you can configure when initialising the SDK:

interface DMESDKConfiguration {
    baseUrl: string;
    retryOptions: RetryOptions;
}

baseUrl: string

Base URL to point to. By default it will use the production environment of digi.me. Unless specifically instructed, it is best to use this environment as it will be the most stable. Default: "https://api.digi.me/1.4"

retryOptions: RetryOptions

Options to specify retry logic for failed API calls. By default we retry any failed API calls five times.


Back to Index

You can’t perform that action at this time.