컨텐츠로 바로가기

시작

GitHub

AI-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-intercom
bunx cap sync
import { CapgoIntercom } from '@capgo/capacitor-intercom';

실시간으로 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();

Intercom에 사용자 속성을 업데이트합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);

로그를 사용자에게 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();

Intercom 메신저를 숨기세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideMessenger();

displayLauncher

displayLauncher 섹션

Intercom launcher 버튼을 보여주세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayLauncher();

Intercom launcher 버튼을 숨기세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideLauncher();

displayInAppMessages

displayInAppMessages 섹션

__CAPGO_KEEP_0__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayInAppMessages();

hideInAppMessages

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.hideInAppMessages();

displayCarousel

__CAPGO_KEEP_5__

__CAPGO_KEEP_6__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayCarousel({} as IntercomCarouselOptions);

displayArticle

__CAPGO_KEEP_8__

__CAPGO_KEEP_9__

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displayArticle({} as IntercomArticleOptions);

displaySurvey

__CAPGO_KEEP_11__

__CAPGO_KEEP_0__을 특정한 Intercom 설문에 표시합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.displaySurvey({} as IntercomSurveyOptions);

__CAPGO_KEEP_0__를 사용하여 사용자 ID 확인을 위한 HMAC를 설정합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserHash({} as IntercomUserHashOptions);

__CAPGO_KEEP_0__를 사용하여 안전한 메신저 인증을 위한 JWT를 설정합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setUserJwt({} as IntercomUserJwtOptions);

setBottomPadding

__CAPGO_KEEP_0__ 섹션

__CAPGO_KEEP_0__를 사용하여 Intercom 메신저 UI의 하단 패딩을 설정합니다.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.setBottomPadding({} as IntercomBottomPaddingOptions);

sendPushTokenToIntercom

__CAPGO_KEEP_0__ 섹션

__CAPGO_KEEP_0__를 Intercom으로 푸시 알림 토큰을 보내세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.sendPushTokenToIntercom({} as IntercomPushTokenOptions);

receivePush

__CAPGO_KEEP_2__

__CAPGO_KEEP_0__을 받은 푸시 알림을 처리하세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.receivePush({} as IntercomPushNotificationData);

getUnreadConversationCount

__CAPGO_KEEP_2__

__CAPGO_KEEP_0__ 사용자의 현재 읽지 않은 대화 수를 가져오세요.

import { CapgoIntercom } from '@capgo/capacitor-intercom';
await CapgoIntercom.getUnreadConversationCount();

__CAPGO_KEEP_3__

__CAPGO_KEEP_2__

IntercomLoadOptions

__CAPGO_KEEP_4__
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. upstream의 공공 API이 변경될 때 다시 싱크를 실행하세요.

Getting Started에서 계속

Getting Started에서 계속하는 섹션

Capacitor를 사용하는 경우 Getting Started 대시보드 및 API 운영을 계획하는 경우, 그것을 Capacitor를 사용하여 @capgo/capacitor-intercom Capacitor를 사용하여 @capgo/capacitor-intercom API 개요 API 개요 소개 소개에서 구현 세부 정보에 대해 API 키 API 키의 구현 세부 정보에 대해, 및 장치 장치의 구현 세부 정보에 대해