Add AI-native customer support, live chat, in-app bug reporting, a help center and surveys to your Capacitor and Ionic apps with Gleap. Gleap is an Intercom alternative for software teams that connects customer conversations and feedback with product development.
This plugin supports Capacitor 7 and later (iOS via Swift Package Manager or CocoaPods). See the instructions below for earlier Capacitor versions.
Thanks to Stephan Nagel (congrapp) for his work on the Gleap Capacitor plugin.
SDK documentation · Website · Plans and pricing
npm install capacitor-gleap-plugin
npx cap syncThe plugin needs Capacitor 7 or later and an iOS deployment target of 15.0 or higher. On iOS it is a Swift package (Package.swift) and pulls the native Gleap iOS SDK from GitHub; it still ships a podspec for apps that use CocoaPods.
Swift Package Manager (recommended). New apps: npx cap add ios --packagemanager SPM. Existing CocoaPods apps can move with npx cap spm-migration-assistant once all their plugins support SPM (see Capacitor: Swift Package Manager). Set the app target's iOS deployment target to 15.0 in Xcode, then run npx cap sync ios again so CapApp-SPM/Package.swift declares iOS 15 as well (the plugin's package requires it).
CocoaPods. Set platform :ios, '15.0' in ios/App/Podfile and run npx cap sync ios. CocoaPods trunk becomes read-only on December 2, 2026, so Gleap iOS SDK versions released after that date are not on trunk. For those, pod install fails with None of your spec sources contain Gleap (= X.Y.Z); add the SDK from GitHub to your app target in the Podfile, with the version the plugin requires (s.dependency 'Gleap', 'X.Y.Z' in node_modules/capacitor-gleap-plugin/CapacitorGleapPlugin.podspec):
target 'App' do
capacitor_pods
# Add your Pods here
pod 'Gleap', :git => 'https://github.com/GleapSDK/Gleap-iOS-SDK.git', :tag => '19.2.2'
endSwift Package Manager is the recommended setup: after December 2, 2026 new Gleap iOS SDK versions are only released through GitHub and Swift Package Manager.
Please install the plugin version from our capacitor-v6 brunch with npm install GleapSDK/Capacitor-SDK#capacitor-v6 --save if you are using capacitor 6.
Please install the plugin version from our capacitor-v5 brunch with npm install GleapSDK/Capacitor-SDK#capacitor-v5 --save if you are using capacitor 5.
Please install the plugin version from our capacitor-v4 brunch with npm install GleapSDK/Capacitor-SDK#capacitor-v4 --save if you are using capacitor 4 or earlier.
Gleap projects live in a data region. The SDK talks to the EU region by default. If your project is hosted in the US region, set the region before calling initialize:
import { Gleap } from "capacitor-gleap-plugin";
await Gleap.setRegion({ region: "us" });
await Gleap.initialize({ API_KEY: "YOUR_API_KEY" });setRegion sets the API, websocket and realtime hosts at once (supported regions: "eu" and "us"). The static widget hosts (frame, banner, modal) are global and are not changed by the region.
For self-hosted or custom setups you can override single hosts with setApiUrl({ url }), setWSApiUrl({ url }), setRealtimeHost({ host }), setFrameUrl({ url }), setBannerUrl({ url }) and setModalUrl({ url }). All of them must be called before initialize; a manual setter called after setRegion overrides that single host.
With every ticket the SDK sends env data (device, OS, screen size, locale, URL, …), shown under the Env data tab in Gleap. Leave out individual keys or stop collecting env data entirely:
await Gleap.setEnvDataPropsToIgnore({ propsToIgnore: ["deviceName", "batteryLevel"] });
await Gleap.setDisableEnvData({ disableEnvData: true });Both can be called at any time and apply to the next ticket. Each setEnvDataPropsToIgnore call replaces the previous list, an empty array resets it. setDisableEnvData({ disableEnvData: false }) turns the collection back on.
Switch the widget between dark and light mode. auto follows the device appearance (on web: the page theme); if your app has its own theme toggle, pass light or dark explicitly and call it again whenever the theme changes:
await Gleap.setColorScheme({ colorScheme: "auto" });
await Gleap.setColorScheme({ colorScheme: isDarkTheme ? "dark" : "light", darkBackgroundColor: "#121212" });setColorScheme only takes effect when "Adapt to dark / light mode" is enabled in the Gleap dashboard; it then overrides the dashboard's color scheme. Before the first call the dashboard setting applies. In dark mode the widget uses the dark mode colors, logo, header image and composer glow set in the Gleap dashboard; without dark colors it keeps its normal colors. lightBackgroundColor / darkBackgroundColor override the background in light / dark mode. Can be called before or after initialize.
With "Require authenticated file access" (Project settings → User identity), conversation files can only be opened by agents and by the verified customer the conversation belongs to. Identify the customer with a user hash (created on your server with the project's identity verification secret) on every app start:
await Gleap.identify({ userId: "user-1", userHash: userHash, email: "jane@example.com" });Email replies link attachments to your customer application URL with a gleapFile query parameter. If that URL opens your app (universal link / App Link), pass it to Gleap; the conversation opens once the customer is identified with a user hash:
import { App } from "@capacitor/app";
const launch = await App.getLaunchUrl();
if (launch?.url) {
await Gleap.openProtectedFileFromUrl({ url: launch.url });
}
App.addListener("appUrlOpen", ({ url }) => {
Gleap.openProtectedFileFromUrl({ url });
});openProtectedFileFromUrl resolves { opened: false } when the URL has no valid gleapFile parameter. On web the JavaScript SDK opens ?gleapFile= links on page load by itself.
initialize(...)setRegion(...)setApiUrl(...)setWSApiUrl(...)setRealtimeHost(...)setFrameUrl(...)setBannerUrl(...)setModalUrl(...)identify(...)updateContact(...)clearIdentity()getIdentity()isUserIdentified()log(...)showSurvey(...)attachCustomData(...)setTags(...)setNetworkLogsBlacklist(...)setNetworkLogPropsToIgnore(...)attachNetworkLogs(...)attachConsoleLogs(...)logsFlushed(...)setEnvDataPropsToIgnore(...)registerAgentTool(...)sendAgentToolResult(...)addListener('agentToolExecution', ...)addListener('logConfigLoaded', ...)addListener('flushLogs', ...)setTicketAttribute(...)unsetTicketAttribute(...)clearTicketAttributes()setCustomData(...)removeCustomData(...)clearCustomData()trackEvent(...)trackPage(...)setEventCallback(...)sendSilentCrashReport(...)preFillForm(...)addAttachment(...)removeAllAttachments()open()openChecklists(...)openChecklist(...)startChecklist(...)openNews(...)openNewsArticle(...)openHelpCenter(...)openHelpCenterArticle(...)askAI(...)openHelpCenterCollection(...)searchHelpCenter(...)openFeatureRequests(...)close()isOpened()startFeedbackFlow(...)startClassicForm(...)startConversation(...)openConversation(...)openConversations(...)openProtectedFileFromUrl(...)startBot(...)showFeedbackButton(...)setDisableInAppNotifications(...)setDisableEnvData(...)setColorScheme(...)setCaptureEnabled(...)setRemoteLogCollectionEnabled(...)setLanguage(...)disableConsoleLogOverwrite()enableDebugConsoleLog()setNotificationContainerOffset(...)- Interfaces
- Type Aliases
initialize(options: { API_KEY: string; }) => Promise<{ initialized: boolean; }>Initialize Gleap with an API key
| Param | Type |
|---|---|
options |
{ API_KEY: string; } |
Returns: Promise<{ initialized: boolean; }>
Since: 7.0.0
setRegion(options: { region: 'eu' | 'us'; }) => Promise<{ region: string; }>Set the data region of your Gleap project ("eu" is the default). Sets the API, websocket and realtime hosts at once. Must be called before initialize. A manual setter (setApiUrl, setWSApiUrl, setRealtimeHost) called afterwards overrides that single host.
| Param | Type |
|---|---|
options |
{ region: 'eu' | 'us'; } |
Returns: Promise<{ region: string; }>
Since: 18.0.0
setApiUrl(options: { url: string; }) => Promise<{ url: string; }>Set a custom API url. Must be called before initialize.
| Param | Type |
|---|---|
options |
{ url: string; } |
Returns: Promise<{ url: string; }>
Since: 18.0.0
setWSApiUrl(options: { url: string; }) => Promise<{ url: string; }>Set a custom websocket API url. Must be called before initialize.
| Param | Type |
|---|---|
options |
{ url: string; } |
Returns: Promise<{ url: string; }>
Since: 18.0.0
setRealtimeHost(options: { host: string; }) => Promise<{ host: string; }>Set a custom realtime host (hostname only, without protocol or path). Must be called before initialize.
| Param | Type |
|---|---|
options |
{ host: string; } |
Returns: Promise<{ host: string; }>
Since: 18.0.0
setFrameUrl(options: { url: string; }) => Promise<{ url: string; }>Set a custom widget frame url. Must be called before initialize.
| Param | Type |
|---|---|
options |
{ url: string; } |
Returns: Promise<{ url: string; }>
Since: 18.0.0
setBannerUrl(options: { url: string; }) => Promise<{ url: string; }>Set a custom banner url. Must be called before initialize.
| Param | Type |
|---|---|
options |
{ url: string; } |
Returns: Promise<{ url: string; }>
Since: 18.0.0
setModalUrl(options: { url: string; }) => Promise<{ url: string; }>Set a custom modal url. Must be called before initialize.
| Param | Type |
|---|---|
options |
{ url: string; } |
Returns: Promise<{ url: string; }>
Since: 18.0.0
identify(options: { userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Record<string, any>; }) => Promise<{ identify: boolean; }>Set user identity
| Param | Type |
|---|---|
options |
{ userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Record<string, any>; } |
Returns: Promise<{ identify: boolean; }>
Since: 7.0.0
updateContact(options: { name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Record<string, any>; }) => Promise<{ identify: boolean; }>Update user properties
| Param | Type |
|---|---|
options |
{ name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Record<string, any>; } |
Returns: Promise<{ identify: boolean; }>
Since: 13.2.1
clearIdentity() => Promise<{ clearIdentity: boolean; }>Clear user identity
Returns: Promise<{ clearIdentity: boolean; }>
Since: 7.0.0
getIdentity() => Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>Get the current user identity
Returns: Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>
Since: 8.1.0
isUserIdentified() => Promise<{ isUserIdentified: boolean; }>User identified status.
Returns: Promise<{ isUserIdentified: boolean; }>
Since: 8.1.0
log(options: { message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; }) => Promise<{ logged: boolean; }>Submit a custom log message with the given level
| Param | Type |
|---|---|
options |
{ message: string; logLevel?: 'ERROR' | 'WARNING' | 'INFO'; } |
Returns: Promise<{ logged: boolean; }>
Since: 7.0.0
showSurvey(options: { surveyId: string; format?: "survey" | "survey_full"; }) => Promise<{ opened: boolean; }>Manually show a survey.
| Param | Type |
|---|---|
options |
{ surveyId: string; format?: 'survey' | 'survey_full'; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.5.1
attachCustomData(options: { data: any; }) => Promise<{ attachedCustomData: boolean; }>Add custom data
| Param | Type |
|---|---|
options |
{ data: any; } |
Returns: Promise<{ attachedCustomData: boolean; }>
Since: 7.0.0
setTags(options: { tags: string[]; }) => Promise<{ tagsSet: boolean; }>Set tags
| Param | Type |
|---|---|
options |
{ tags: string[]; } |
Returns: Promise<{ tagsSet: boolean; }>
Since: 8.6.0
setNetworkLogsBlacklist(options: { blacklist: string[]; }) => Promise<{ blacklistSet: boolean; }>Set network logs blacklist
| Param | Type |
|---|---|
options |
{ blacklist: string[]; } |
Returns: Promise<{ blacklistSet: boolean; }>
Since: 13.2.1
setNetworkLogPropsToIgnore(options: { propsToIgnore: string[]; }) => Promise<{ propsToIgnoreSet: boolean; }>Set network logs props to ignore
| Param | Type |
|---|---|
options |
{ propsToIgnore: string[]; } |
Returns: Promise<{ propsToIgnoreSet: boolean; }>
Since: 13.2.1
attachNetworkLogs(options: { logs: GleapNetworkLogEntry[]; }) => Promise<{ networkLogsAttached: boolean; }>Hands the network requests made inside the app's WebView (fetch and XMLHttpRequest) to the native SDK, so they show up in the network logs of tickets. The plugin calls this for you on iOS and Android; each call replaces the previously attached WebView network logs. No-op on web, where the JavaScript SDK records requests itself.
| Param | Type |
|---|---|
options |
{ logs: GleapNetworkLogEntry[]; } |
Returns: Promise<{ networkLogsAttached: boolean; }>
Since: 19.0.0
attachConsoleLogs(options: { logs: GleapConsoleLogEntry[]; }) => Promise<{ consoleLogsAttached: boolean; }>Hands the console output of the app's WebView (console.log/info/warn/error/debug, uncaught errors and unhandled promise rejections) to the native SDK, so it shows up in the console logs of tickets. The plugin calls this for you on iOS and Android; each call replaces the previously attached WebView console logs. No-op on web, where the JavaScript SDK records the console itself.
| Param | Type |
|---|---|
options |
{ logs: GleapConsoleLogEntry[]; } |
Returns: Promise<{ consoleLogsAttached: boolean; }>
Since: 19.0.0
logsFlushed(options: { flushId: string; }) => Promise<void>Answers a flushLogs event once the WebView console and network logs the plugin buffers were handed to the native
SDK, so it collects the logs for a capture request with them. The plugin calls this for you on iOS and Android.
No-op on web.
| Param | Type |
|---|---|
options |
{ flushId: string; } |
Since: 19.1.0
setEnvDataPropsToIgnore(options: { propsToIgnore: string[]; }) => Promise<{ envDataPropsToIgnoreSet: boolean; }>Set env data props to ignore. The given env data keys (exact and case-sensitive, e.g. "deviceName" or "currentUrl") are removed before a ticket or conversation is sent. Each call replaces the previous list, an empty list resets it. Can be called before or after initialize.
| Param | Type |
|---|---|
options |
{ propsToIgnore: string[]; } |
Returns: Promise<{ envDataPropsToIgnoreSet: boolean; }>
Since: 18.1.0
registerAgentTool(options: { name: string; }) => Promise<void>Registers a Frontend tool defined on your AI agent in the Gleap dashboard.
Prefer the registerAgentTool(name, handler) helper exported by this
package — it wires the agentToolExecution event and result round-trip for
you.
| Param | Type |
|---|---|
options |
{ name: string; } |
Since: 15.0.0
sendAgentToolResult(options: { executionId: string; result: string; }) => Promise<void>Resolves a pending agent tool execution with the handler's result.
Used by the registerAgentTool(name, handler) helper.
| Param | Type |
|---|---|
options |
{ executionId: string; result: string; } |
Since: 15.0.0
addListener(eventName: 'agentToolExecution', listenerFunc: (data: { executionId: string; name: string; params: any; }) => void) => Promise<PluginListenerHandle>Called when a registered agent tool should execute.
| Param | Type |
|---|---|
eventName |
'agentToolExecution' |
listenerFunc |
(data: { executionId: string; name: string; params: any; }) => void |
Returns: Promise<PluginListenerHandle>
Since: 15.0.0
addListener(eventName: 'logConfigLoaded', listenerFunc: (config: GleapLogConfig) => void) => Promise<PluginListenerHandle>Called on iOS and Android when the project config is loaded, with the network log settings the plugin's WebView log capture needs (network logs are only recorded when they are enabled for your project).
| Param | Type |
|---|---|
eventName |
'logConfigLoaded' |
listenerFunc |
(config: GleapLogConfig) => void |
Returns: Promise<PluginListenerHandle>
Since: 19.0.0
addListener(eventName: 'flushLogs', listenerFunc: (data: { flushId: string; }) => void) => Promise<PluginListenerHandle>Called on iOS and Android right before the native SDK collects the logs for a capture request: the plugin's
WebView log capture hands over what it buffers (it pushes at most every 500 ms otherwise) and answers with
logsFlushed. The native SDK waits at most 500 ms for the answer. The plugin listens for you.
| Param | Type |
|---|---|
eventName |
'flushLogs' |
listenerFunc |
(data: { flushId: string; }) => void |
Returns: Promise<PluginListenerHandle>
Since: 19.1.0
setTicketAttribute(options: { key: string; value: string; }) => Promise<{ setTicketAttribute: boolean; }>Sets the value of a ticket attribute
| Param | Type |
|---|---|
options |
{ key: string; value: string; } |
Returns: Promise<{ setTicketAttribute: boolean; }>
Since: 13.5.0
unsetTicketAttribute(options: { key: string; }) => Promise<{ unsetTicketAttribute: boolean; }>Unset a ticket attribute
| Param | Type |
|---|---|
options |
{ key: string; } |
Returns: Promise<{ unsetTicketAttribute: boolean; }>
Since: 14.1.0
clearTicketAttributes() => Promise<{ clearTicketAttributes: boolean; }>Clear all ticket attributes
Returns: Promise<{ clearTicketAttributes: boolean; }>
Since: 14.1.0
setCustomData(options: { key: string; value: string; }) => Promise<{ setCustomData: boolean; }>Set custom data
| Param | Type |
|---|---|
options |
{ key: string; value: string; } |
Returns: Promise<{ setCustomData: boolean; }>
Since: 7.0.0
removeCustomData(options: { key: string; }) => Promise<{ removedCustomData: boolean; }>Remove custom data by key
| Param | Type |
|---|---|
options |
{ key: string; } |
Returns: Promise<{ removedCustomData: boolean; }>
Since: 7.0.0
clearCustomData() => Promise<{ clearedCustomData: boolean; }>Clear custom data
Returns: Promise<{ clearedCustomData: boolean; }>
Since: 7.0.0
trackEvent(options: { name: string; data?: any; }) => Promise<{ loggedEvent: boolean; }>Log event to Gleap
| Param | Type |
|---|---|
options |
{ name: string; data?: any; } |
Returns: Promise<{ loggedEvent: boolean; }>
Since: 8.0.0
trackPage(options: { pageName: string; }) => Promise<{ trackedPage: boolean; }>Track a page view
| Param | Type |
|---|---|
options |
{ pageName: string; } |
Returns: Promise<{ trackedPage: boolean; }>
Since: 8.4.1
setEventCallback(callback: GleapEventCallback) => Promise<CallbackID>| Param | Type |
|---|---|
callback |
GleapEventCallback |
Returns: Promise<string>
Since: 7.0.0
sendSilentCrashReport(options: { description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }) => Promise<{ sentSilentBugReport: boolean; }>Log event to Gleap
| Param | Type |
|---|---|
options |
{ description: string; severity?: 'LOW' | 'MEDIUM' | 'HIGH'; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; } |
Returns: Promise<{ sentSilentBugReport: boolean; }>
Since: 7.0.0
preFillForm(options: { data: any; }) => Promise<{ preFilledForm: boolean; }>Prefills the widget's form data
| Param | Type |
|---|---|
options |
{ data: any; } |
Returns: Promise<{ preFilledForm: boolean; }>
Since: 7.0.0
addAttachment(options: { base64data: string; name: string; }) => Promise<{ attachmentAdded: boolean; }>Add attachment as bas64 string
| Param | Type |
|---|---|
options |
{ base64data: string; name: string; } |
Returns: Promise<{ attachmentAdded: boolean; }>
Since: 7.0.0
removeAllAttachments() => Promise<{ allAttachmentsRemoved: boolean; }>All attachments removed
Returns: Promise<{ allAttachmentsRemoved: boolean; }>
Since: 7.0.0
open() => Promise<{ openedWidget: boolean; }>Open widget
Returns: Promise<{ openedWidget: boolean; }>
Since: 7.0.0
openChecklists(options: { showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Open checklists
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 19.0.0
openChecklist(options: { checklistId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Open checklist
| Param | Type |
|---|---|
options |
{ checklistId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 19.0.0
startChecklist(options: { outboundId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Start checklist
| Param | Type |
|---|---|
options |
{ outboundId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 19.0.0
openNews(options: { showBackButton?: boolean; }) => Promise<{ openedNews: boolean; }>Open news
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ openedNews: boolean; }>
Since: 8.4.0
openNewsArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Open news article
| Param | Type |
|---|---|
options |
{ articleId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenter(options: { showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Open help center
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenterArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Open help center article
| Param | Type |
|---|---|
options |
{ articleId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
askAI(options: { question: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Ask the AI a question
| Param | Type |
|---|---|
options |
{ question: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 15.0.0
openHelpCenterCollection(options: { collectionId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Open help center collection
| Param | Type |
|---|---|
options |
{ collectionId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
searchHelpCenter(options: { term: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>Search help center
| Param | Type |
|---|---|
options |
{ term: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openFeatureRequests(options: { showBackButton?: boolean; }) => Promise<{ openedFeatureRequests: boolean; }>Open feature requests
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ openedFeatureRequests: boolean; }>
Since: 8.4.0
close() => Promise<{ closedWidget: boolean; }>Close widget
Returns: Promise<{ closedWidget: boolean; }>
Since: 7.0.0
isOpened() => Promise<{ isOpened: boolean; }>Check widget status code
Returns: Promise<{ isOpened: boolean; }>
Since: 7.0.0
startFeedbackFlow(options: { feedbackFlow?: string; showBackButton?: boolean; }) => Promise<{ startedFeedbackFlow: boolean; }>Start feedback flow
| Param | Type |
|---|---|
options |
{ feedbackFlow?: string; showBackButton?: boolean; } |
Returns: Promise<{ startedFeedbackFlow: boolean; }>
Since: 7.0.0
startClassicForm(options: { formId?: string; showBackButton?: boolean; }) => Promise<{ classicFormStarted: boolean; }>Start a classic form
| Param | Type |
|---|---|
options |
{ formId?: string; showBackButton?: boolean; } |
Returns: Promise<{ classicFormStarted: boolean; }>
Since: 13.1.0
startConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationStarted: boolean; }>Start a new conversation
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ conversationStarted: boolean; }>
Since: 13.1.0
openConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationsOpened: boolean; }>Opens the conversations tab.
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ conversationsOpened: boolean; }>
Since: 13.9.0
openConversations(options: { showBackButton?: boolean; }) => Promise<{ conversationsOpened: boolean; }>Opens the conversations tab (same as openConversation).
| Param | Type |
|---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ conversationsOpened: boolean; }>
Since: 19.0.0
openProtectedFileFromUrl(options: { url: string; }) => Promise<{ opened: boolean; }>Open the conversation of a protected file from an emailed link.
With "Require authenticated file access" enabled, email replies link attachments to your customer
application URL with a gleapFile query parameter. If that URL opens your app (for example as a
universal link / App Link), pass it here, e.g. from App.addListener('appUrlOpen') or
App.getLaunchUrl() of @capacitor/app. opened is true when the URL carries a Gleap file reference.
The conversation opens once the customer is identified with a user hash (identify with userHash);
the link alone grants nothing. On web the JavaScript SDK handles ?gleapFile= automatically on page load,
so this resolves { opened: false } there.
| Param | Type |
|---|---|
options |
{ url: string; } |
Returns: Promise<{ opened: boolean; }>
Since: 19.0.1
startBot(options: { botId?: string; showBackButton?: boolean; }) => Promise<{ startedBot: boolean; }>Start bot
| Param | Type |
|---|---|
options |
{ botId?: string; showBackButton?: boolean; } |
Returns: Promise<{ startedBot: boolean; }>
Since: 10.0.3
showFeedbackButton(options: { show?: boolean; }) => Promise<{ feedbackButtonShown: boolean; }>Show or hide the feedback button.
| Param | Type |
|---|---|
options |
{ show?: boolean; } |
Returns: Promise<{ feedbackButtonShown: boolean; }>
Since: 8.0.0
setDisableInAppNotifications(options: { disableInAppNotifications?: boolean; }) => Promise<{ inAppNotificationsDisabled: boolean; }>Disable in app notifications.
| Param | Type |
|---|---|
options |
{ disableInAppNotifications?: boolean; } |
Returns: Promise<{ inAppNotificationsDisabled: boolean; }>
Since: 8.6.1
setDisableEnvData(options: { disableEnvData: boolean; }) => Promise<{ envDataDisabled: boolean; }>Disable env data. While disabled (true), no env data (device, OS, screen size, locale, URL, ...) is collected and tickets are sent without it. Pass false to collect env data again. Can be called before or after initialize.
| Param | Type |
|---|---|
options |
{ disableEnvData: boolean; } |
Returns: Promise<{ envDataDisabled: boolean; }>
Since: 18.1.0
setColorScheme(options: { colorScheme: 'auto' | 'light' | 'dark'; lightBackgroundColor?: string; darkBackgroundColor?: string; }) => Promise<{ colorScheme: string; }>Set the color scheme of the widget. Overrides the color scheme configured in the Gleap dashboard. Only takes effect when "Adapt to dark / light mode" is enabled in the dashboard; otherwise the widget always keeps its normal colors. Before the first call the dashboard setting applies. "auto" follows the device appearance (dark/light mode) on iOS and Android, and the page theme on web. Apps with their own in-app theme toggle should pass "light" / "dark" explicitly and call it again whenever the theme changes. In dark mode the widget uses the dark mode colors, logo, header image and composer glow set in the Gleap dashboard; without dark colors it keeps its normal colors. lightBackgroundColor / darkBackgroundColor override the background. Can be called before or after initialize and applies live.
| Param | Type |
|---|---|
options |
{ colorScheme: 'auto' | 'light' | 'dark'; lightBackgroundColor?: string; darkBackgroundColor?: string; } |
Returns: Promise<{ colorScheme: string; }>
Since: 19.0.0
setCaptureEnabled(options: { enabled: boolean; }) => Promise<{ captureEnabled: boolean; }>Enable or disable screenshots and screen recordings for capture requests: when a workflow, an AI agent or a teammate asks the user in the widget to show the issue, the widget steps aside, a small bar lets the user go to the right screen, and the SDK captures the app once they tap Capture (or records it between Start and Stop). Nothing is captured without that tap. While disabled, the widget only offers to upload a file. Enabled by default. Works on iOS, Android and web and can be called before or after initialize.
| Param | Type |
|---|---|
options |
{ enabled: boolean; } |
Returns: Promise<{ captureEnabled: boolean; }>
Since: 19.1.0
setRemoteLogCollectionEnabled(options: { enabled: boolean; }) => Promise<{ remoteLogCollectionEnabled: boolean; }>Enable or disable sending the app's logs for capture requests: a workflow or an AI agent can ask for the logs while the app runs (no user action), and screenshots and recordings can bring the logs around them. The logs are what a bug report carries (console and network logs, custom data, env data, custom events; the replay only when it is asked for and enabled in the dashboard), and the existing settings still apply (e.g. setDisableEnvData). While disabled, log requests are answered as not supported and captures are sent without logs. Enabled by default. Works on iOS, Android and web and can be called before or after initialize.
| Param | Type |
|---|---|
options |
{ enabled: boolean; } |
Returns: Promise<{ remoteLogCollectionEnabled: boolean; }>
Since: 19.1.0
setLanguage(options: { languageCode: string; }) => Promise<{ setLanguage: string; }>Set Language
| Param | Type |
|---|---|
options |
{ languageCode: string; } |
Returns: Promise<{ setLanguage: string; }>
Since: 7.0.0
disableConsoleLogOverwrite() => Promise<{ consoleLogDisabled: boolean; }>Disable console log overwrite: stops recording the console output of the app's WebView (console methods are restored) and drops the WebView console logs recorded so far.
Returns: Promise<{ consoleLogDisabled: boolean; }>
Since: 7.0.0
enableDebugConsoleLog() => Promise<{ debugConsoleLogEnabled: boolean; }>Enable debug console log
Returns: Promise<{ debugConsoleLogEnabled: boolean; }>
Since: 7.0.0
setNotificationContainerOffset(options: { x: number; y: number; }) => Promise<{ notificationContainerOffsetSet: boolean; }>Set the notification container offset
| Param | Type |
|---|---|
options |
{ x: number; y: number; } |
Returns: Promise<{ notificationContainerOffsetSet: boolean; }>
Since: 15.2.0
A network log entry (fetch / XMLHttpRequest) as the plugin hands it to the native SDK.
| Prop | Type | Description |
|---|---|---|
date |
string |
ISO-8601 UTC timestamp of the request start. |
type |
string |
HTTP method, uppercase. |
url |
string |
|
duration |
number |
Milliseconds from the request start to the response headers (or the failure). |
success |
boolean |
true when an HTTP response arrived (any status), false on a transport error, abort or timeout. |
request |
{ headers?: { [name: string]: string; }; payload?: string; } |
|
response |
{ status?: number; statusText?: string; headers?: { [name: string]: string; }; responseText?: string; errorText?: string; } |
A console log entry as the plugin hands it to the native SDK.
| Prop | Type | Description |
|---|---|---|
date |
string |
ISO-8601 UTC timestamp with milliseconds. |
priority |
'ERROR' | 'WARNING' | 'INFO' |
|
log |
string |
| Prop | Type |
|---|---|
remove |
() => Promise<void> |
The network log settings of your Gleap project, sent by the native SDK once its config is loaded.
| Prop | Type |
|---|---|
enableNetworkLogs |
boolean |
networkLogPropsToIgnore |
string[] |
networkLogBlacklist |
string[] |
| Prop | Type |
|---|---|
name |
string |
data |
any |
| Method | Signature | Description |
|---|---|---|
| valueOf | () => boolean | Returns the primitive value of the specified object. |
Construct a type with a set of properties K of type T
{
[P in K]: T;
}
(message: GleapEventMessage | null, err?: any): void
string