Intercom Capgo repository
このプラグインのインストールステップとフルマークダウンガイドを含むセットアップの質問をコピーしてください。
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.
インストール
InstallAI-Assisted Setupを使用してプラグインをインストールすることができます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。
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
「registerIdentifiedUser」知っているユーザーを Intercom に登録します。 ユーザーIDまたはメールアドレスのいずれかを指定してください。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
「registerUnidentifiedUser」匿名ユーザーを Intercom に登録します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();updateUser
「updateUser」Intercomユーザー属性を更新します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);logout
セクション「ログアウト」Intercomからユーザーをログアウトします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logout();logEvent
セクション「logEvent」Intercomにカスタムイベントをログします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.logEvent({} as IntercomLogEventOptions);displayMessenger
セクション「displayMessenger」Intercomメッセンジャーを開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessenger();displayMessageComposer
セクション「displayMessageComposer」メッセージコンポーザーを開き、事前に入力されたメッセージで埋め込まれています。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayMessageComposer({} as IntercomMessageComposerOptions);displayHelpCenter
「表示ヘルプセンター」セクションインターコムヘルプセンターを開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
「メッセージャー非表示」セクションインターコムメッセージャーを非表示にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
「インターコムランチャー表示」セクションインターコムランチャーボタンを表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
「インターコムランチャー非表示」セクションIntercomの起動ボタンを非表示にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
Section titled “displayInAppMessages”Intercomのインアプリメッセージを有効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
Section titled “hideInAppMessages”Intercomのインアプリメッセージを無効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
Section titled “displayCarousel”特定のIntercomのキャローセルを表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);displayArticle
Section titled “displayArticle”特定のIntercom記事を表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);displaySurvey
セクション「表示調査」特定のIntercom調査を表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);setUserHash
セクション「ユーザーハッシュを設定」ユーザー認証のためのHMACを設定します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);setUserJwt
セクション「ユーザーJWTを設定」安全なメッセンジャーアUTHのためのJWTを設定します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);setBottomPadding
セクション「下部パディングを設定」Intercom メッセンジャー 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();型の参照
「Type Reference」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.tsAPIがアップストリームで変更された場合に再度同期を実行してください。
Getting Startedから続けてください
「Getting Startedから続けてください」Capacitorを使用している場合 Capacitor Using @API/__CAPGO_KEEP_1__-intercom Using @capgo/capacitor-intercom Using @capgo/capacitor-intercom API オーバービュー API オーバービューの実装詳細について イントロダクション イントロダクションの実装詳細について API キー API キーの実装詳細について、 デバイス デバイスの実装詳細について。