Developers

GetAppData

Usage

Use this method to return application-related data stored in the Chatbot instance's Settings > Extra Info screen.

Mandatory parameters

Name Type Description
dataId String The group name defined in the Chatbot instance's Settings > Extra Info screen. Must be included in the appDataInfo object.

Optional parameters

Name Type Description
name String The Name element defined in the Chatbot instance's Settings > Extra Info screen

Response data format

This method calls the Chatbot API’s GET /app/data/{dataId} endpoint. It returns a Promise with the API response data. Please refer to the Responses section of the endpoint on the Chatbot API Routes page for the response format.

Example

const appDataInfo = {
    dataID: "bot_labels",
    name: "CustomLabels",
};

chatbot.api.getAppData(appDataInfo).then(response => {
    // Use the data!
});