Getting Started
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-intercom`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/intercom/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Install
Section titled âInstallâbun add @capgo/capacitor-intercombunx cap syncimport { CapgoIntercom } from '@capgo/capacitor-intercom';API Overview
Section titled âAPI OverviewâloadWithKeys
Section titled âloadWithKeysâInitialize Intercom with API keys at runtime. Use this if you prefer not to configure keys in capacitor.config.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);registerIdentifiedUser
Section titled âregisterIdentifiedUserâRegister a known user with Intercom. At least one of userId or email must be provided.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
Section titled âregisterUnidentifiedUserâRegister an anonymous user with Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();updateUser
Section titled âupdateUserâUpdate user attributes in Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);Log the user out of Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();logEvent
Section titled âlogEventâLog a custom event in Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
Section titled âdisplayMessengerâOpen the Intercom messenger.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
Section titled âdisplayMessageComposerâOpen the message composer with a pre-filled message.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);displayHelpCenter
Section titled âdisplayHelpCenterâOpen the Intercom help center.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
Section titled âhideMessengerâHide the Intercom messenger.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
Section titled âdisplayLauncherâShow the Intercom launcher button.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
Section titled âhideLauncherâHide the Intercom launcher button.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
Section titled âdisplayInAppMessagesâEnable in-app messages from Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
Section titled âhideInAppMessagesâDisable in-app messages from Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
Section titled âdisplayCarouselâDisplay a specific Intercom carousel.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
Section titled âdisplayArticleâDisplay a specific Intercom article.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);displaySurvey
Section titled âdisplaySurveyâDisplay a specific Intercom survey.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);setUserHash
Section titled âsetUserHashâSet the HMAC for identity verification.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);setUserJwt
Section titled âsetUserJwtâSet JWT for secure messenger authentication.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);setBottomPadding
Section titled âsetBottomPaddingâSet the bottom padding for the Intercom messenger UI.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);sendPushTokenToIntercom
Section titled âsendPushTokenToIntercomâSend a push notification token to Intercom.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
Section titled âreceivePushâHandle a received Intercom push notification.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
Section titled âgetUnreadConversationCountâGet the number of unread conversations for the current user.
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();Type Reference
Section titled âType ReferenceâIntercomLoadOptions
Section titled âIntercomLoadOptionsâexport interface IntercomLoadOptions { appId?: string; apiKeyIOS?: string; apiKeyAndroid?: string;}IntercomIdentifiedUserOptions
Section titled âIntercomIdentifiedUserOptionsâexport interface IntercomIdentifiedUserOptions { userId?: string; email?: string;}IntercomUserUpdateOptions
Section titled âIntercomUserUpdateOptionsâexport interface IntercomUserUpdateOptions { userId?: string; email?: string; name?: string; phone?: string; languageOverride?: string; customAttributes?: { [key: string]: any }; companies?: IntercomCompany[];}IntercomLogEventOptions
Section titled âIntercomLogEventOptionsâexport interface IntercomLogEventOptions { name: string; data?: { [key: string]: any };}IntercomMessageComposerOptions
Section titled âIntercomMessageComposerOptionsâexport interface IntercomMessageComposerOptions { message: string;}IntercomCarouselOptions
Section titled âIntercomCarouselOptionsâexport interface IntercomCarouselOptions { carouselId: string;}IntercomArticleOptions
Section titled âIntercomArticleOptionsâexport interface IntercomArticleOptions { articleId: string;}IntercomSurveyOptions
Section titled âIntercomSurveyOptionsâexport interface IntercomSurveyOptions { surveyId: string;}IntercomUserHashOptions
Section titled âIntercomUserHashOptionsâexport interface IntercomUserHashOptions { hmac: string;}IntercomUserJwtOptions
Section titled âIntercomUserJwtOptionsâexport interface IntercomUserJwtOptions { jwt: string;}IntercomBottomPaddingOptions
Section titled âIntercomBottomPaddingOptionsâexport interface IntercomBottomPaddingOptions { value: number;}IntercomPushTokenOptions
Section titled âIntercomPushTokenOptionsâexport interface IntercomPushTokenOptions { value: string;}Source Of Truth
Section titled âSource Of TruthâThis page is generated from the pluginâs src/definitions.ts. Re-run the sync when the public API changes upstream.
Keep going from Getting Started
Section titled âKeep going from Getting StartedâIf you are using Getting Started to plan dashboard and API operations, connect it with Using @capgo/capacitor-intercom for the native capability in Using @capgo/capacitor-intercom, API Overview for the implementation detail in API Overview, Introduction for the implementation detail in Introduction, API Keys for the implementation detail in API Keys, and Devices for the implementation detail in Devices.