Getting Started
Dieser Inhalt ist in Ihrer Sprache noch nicht verfügbar.
-
Install the package
Terminal-Fenster npm i @capgo/capacitor-intercomTerminal-Fenster pnpm add @capgo/capacitor-intercomTerminal-Fenster yarn add @capgo/capacitor-intercomTerminal-Fenster bun add @capgo/capacitor-intercom -
Sync with native projects
Terminal-Fenster npx cap syncTerminal-Fenster pnpm cap syncTerminal-Fenster yarn cap syncTerminal-Fenster bunx cap sync -
Add keys in
capacitor.config.ts(optional) You can configure Intercom at startup time with this section:{"plugins": {"CapgoIntercom": {"iosApiKey": "ios_sdk-xxx","iosAppId": "your_ios_app_id","androidApiKey": "android_sdk-xxx","androidAppId": "your_android_app_id"}}}
Initialize Intercom
Section titled “Initialize Intercom”Use loadWithKeys() to provide credentials at runtime:
import { CapgoIntercom } from '@capgo/capacitor-intercom'
await CapgoIntercom.loadWithKeys({ appId: 'your_app_id', apiKeyIOS: 'ios_sdk-xxx', apiKeyAndroid: 'android_sdk-xxx',})Use Intercom in your app
Section titled “Use Intercom in your app”Open the messenger and show support UI in one line:
import { CapgoIntercom } from '@capgo/capacitor-intercom'
await CapgoIntercom.displayMessenger()await CapgoIntercom.displayHelpCenter()API quick reference
Section titled “API quick reference”await CapgoIntercom.registerIdentifiedUser({ email: 'user@example.com' })await CapgoIntercom.displayArticle({ articleId: 'article-id' })await CapgoIntercom.displayCarousel({ carouselId: 'carousel-id' })await CapgoIntercom.displayMessageComposer({ message: 'Hi, I need help' })await CapgoIntercom.registerUnidentifiedUser()await CapgoIntercom.hideMessenger()const { count } = await CapgoIntercom.getUnreadConversationCount()Platform notes
Section titled “Platform notes”- iOS: Requires iOS 10+.
- Android: Supports Android 5.0+ (API 21+).
- Works with both Capacitor and Cordova environments for native apps.
You now have a functional Intercom setup and can start adding event logging, identity sync, and support messaging.