Skip to main content

Initialize Plugin

The DytePlugin class is the root class of Plugin SDK. It is the main entry point of the SDK. It is the only class that you need to instantiate in order to use the SDK.

A plugin object can be created using DytePlugin.init() method. The init() method can take an optional config object.


Do checkout “Guides” for end to end examples on the usage of these modules.

The following is the schema for the config object :

ParamTypeDescriptionDefault ValueRequired
authTokenstringAuthorisation by client SDK.false
baseURLstringServer URL being used by the parent by client SDK.false
parentURLstringURL of the parent app the plugin is opened by client SDK.false
pluginIdstringID generated using Dyte by client SDK.false
readybooleantrue when the plugin initialization has completed.truefalse
import DytePlugin from "@dytesdk/plugin-sdk";
const plugin = DytePlugin.init();
await plugin.stores.populate('storeName');