Skip to main content
Open or start conversations in the Gleap widget programmatically. All methods take an optional showBackButton (default true) that controls whether the widget shows a back arrow. Conversations

Gleap.startConversation(showBackButton?)

Start a new conversation in the widget.
Gleap.startConversation();

Gleap.openConversations(showBackButton?)

Open the conversation history overview.
Gleap.openConversations();

Gleap.openConversation(shareToken, showBackButton?)

Open a specific conversation by its share token.
Gleap.openConversation("SHARE_TOKEN");

Gleap.startBot(botId, showBackButton?)

Start a new conversation routed to a specific bot.
Gleap.startBot("YOUR_BOT_ID");

Gleap.askAI(question, showBackButton?)

Open the widget conversation flow with a question pre-asked to Kai.
Gleap.askAI("How do I reset my password?");