Getting Started
このプラグインのインストール手順とフルマークダウンガイドを含む設定用の質問をコピーする。
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.
インストール
「インストール」のセクション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
「ユーザーを登録する」セクション既知のユーザーをIntercomに登録します。 ユーザーIDまたはメールアドレスのいずれかを入力する必要があります。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);registerUnidentifiedUser
「匿名ユーザーを登録する」セクションIntercomに匿名ユーザーを登録します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.registerUnidentifiedUser();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
「displayHelpCenter」セクションIntercomのヘルプセンターを開きます。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayHelpCenter();hideMessenger
「hideMessenger」を表示Intercomのメッセンジャーを非表示にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();displayLauncher
「displayLauncher」を表示Intercomのローンチボタンを表示します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();hideLauncher
「hideLauncher」を表示Intercomのローンチボタンを非表示にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();displayInAppMessages
「displayInAppMessages」を表示Intercomのインアプリメッセージを有効にします。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();hideInAppMessages
「アプリ内メッセージを非表示にする」セクションIntercomのアプリ内メッセージを非表示にする
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();displayCarousel
「カーレルを表示する」セクション特定のIntercomカーレルを表示する
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);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
クリップボードにコピーIntercomにプッシュ通知トークンを送信します。
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);receivePush
受信通知を処理する受信通知を処理する
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);getUnreadConversationCount
未読会話の数を取得するクリップボードにコピー
import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();IntercomLoadOptions
クリップボードにコピーexport interface IntercomLoadOptions { appId?: string; apiKeyIOS?: string; apiKeyAndroid?: string;}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. upstream の API が変更されたときに再度 sync を実行してください。
Getting Started から続けてください。
Getting Started というセクションCapgo を使用している場合 Getting Started ダッシュボードと API の作業を計画するには、を接続してください。 native capability を使用する場合の @capgo/capacitor-intercom native capability を使用する場合の @capgo/capacitor-intercom API の概要 API の実装詳細 __CAPGO_KEEP_0__ の実装詳細 導入 API キー API キーとその実装詳細のための デバイス デバイスの実装詳細のための