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”You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のコマンドを使用してください:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intercom` plugin in my project.Manual Setupを使用する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム固有の説明を参照してください:
bun add @capgo/capacitor-intercombunx cap syncインポート
セクション「インポート」import { CapgoIntercom } from '@capgo/capacitor-intercom';APIの概要
セクション「APIの概要」loadWithKeys
loadWithKeys実行時にAPIキーの設定を使用してIntercomを初期化します。 capacitor.configにキーの設定を含めない場合はこちらを使用してください。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);registerIdentifiedUser
ユーザーを登録Section titled “registerIdentifiedUser”
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
Copy to clipboardSection titled “registerUnidentifiedUser”
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();updateUser
ユーザー属性をIntercomに更新します。Copy to clipboard
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);logout
ログアウトIntercom からユーザーをログアウトします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();logEvent
イベントログIntercom でのカスタムイベントをログします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
メッセンジャー表示Intercom のメッセンジャーを開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
メッセージコンポーザー表示メッセージコンポーザーを開き、メッセージを事前に埋め込みます。
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
displayInAppMessagesのセクションIntercomからインアプリメッセージを有効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
hideInAppMessagesのセクションIntercomからインアプリメッセージを無効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
displayCarouselのセクション特定のIntercomカーレルを表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
displayArticleのセクション特定のIntercom記事を表示します。
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
「sendPushTokenToIntercom」セクションIntercomにプッシュ通知トークンを送信します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
「receivePush」セクションIntercomから受信したプッシュ通知を処理します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
「getUnreadConversationCount」セクション現在のユーザーの未読会話の数を取得します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();型リファレンス
「型リファレンス」セクションIntercomLoadOptions
「IntercomLoadOptions」セクションexport interface IntercomLoadOptions { appId?: string; apiKeyIOS?: string; apiKeyAndroid?: string;}IntercomIdentifiedUserOptions
「IntercomIdentifiedUserOptions」セクションexport interface IntercomIdentifiedUserOptions { userId?: string; email?: string;}IntercomUserUpdateOptions
「IntercomUserUpdateOptions」セクションexport interface IntercomUserUpdateOptions { userId?: string; email?: string; name?: string; phone?: string; languageOverride?: string; customAttributes?: { [key: string]: any }; companies?: IntercomCompany[];}IntercomLogEventOptions
「IntercomLogEventOptions」セクションexport interface IntercomLogEventOptions { name: string; data?: { [key: string]: any };}IntercomMessageComposerOptions
「IntercomMessageComposerOptions」セクションexport interface IntercomMessageComposerOptions { message: string;}IntercomCarouselOptions
「IntercomCarouselOptions」セクションexport interface IntercomCarouselOptions { carouselId: string;}IntercomArticleOptions
「IntercomArticleOptions」セクションexport interface IntercomArticleOptions { articleId: string;}IntercomSurveyOptions
「IntercomSurveyOptions」セクションexport interface IntercomSurveyOptions { surveyId: string;}IntercomUserHashOptions
「IntercomUserHashOptions」セクションexport interface IntercomUserHashOptions { hmac: string;}IntercomUserJwtOptions
「IntercomUserJwtOptions」セクションexport interface IntercomUserJwtOptions { jwt: string;}IntercomBottomPaddingOptions
「IntercomBottomPaddingOptions」セクションexport interface IntercomBottomPaddingOptions { value: number;}IntercomPushTokenOptions
「IntercomPushTokenOptions」セクションexport interface IntercomPushTokenOptions { value: string;}「ソース・オブ・トラース」
「ソース オブ トゥルース」プラグインの生成元のページです。 src/definitions.tsパブリック API がアップストリームで変更された場合、再度同期を実行してください。
「Getting Started」から続けてください。
「Getting Started」から続けてください。「Getting Started」を使用して、ダッシュボードと __CAPGO_KEEP_0__ の操作を計画する場合、__CAPGO_KEEP_0__ を接続してください。 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intercom を使用して、ネイティブ機能を実装してください。 @API/__CAPGO_KEEP_1__-intercom のネイティブ機能の実装については、@API/__CAPGO_KEEP_1__-intercom を参照してください。 Using @capgo/capacitor-intercom for the native capability in Using @capgo/capacitor-intercom, API Overview API イントロダクション イントロダクションの実装詳細について API キー API キーの実装詳細について、 デバイス デバイスの実装詳細について