Crisp native SDK for capacitor
npm install capacitor-crisp
npx cap sync
Call configure in your code Before any other method :
import { CapacitorCrisp } from 'capacitor-crisp';
CapacitorCrisp.configure({websiteID: '******-****-****-****-********'})
To enable your users to take and upload photos to the chat as well as download photos to their photo library, add :
Privacy - Camera Usage Description (NSCameraUsageDescription)
Privacy - Photo Library Additions Usage Description (NSPhotoLibraryAddUsageDescription)
to your app's Info.plist.
Nothing special to do.
import { CapacitorCrisp } from 'capacitor-crisp';
CapacitorCrisp.openMessenger()
configure(data: { websiteID: string; }) => Promise<void>
Param |
Type |
data |
{ websiteID: string; } |
openMessenger() => Promise<void>
setTokenID(data: { tokenID: string; }) => Promise<void>
Param |
Type |
data |
{ tokenID: string; } |
setUser(data: { nickname?: string; phone?: string; email?: string; avatar?: string; }) => Promise<void>
Param |
Type |
data |
{ nickname?: string; phone?: string; email?: string; avatar?: string; } |
pushEvent(data: { name: string; color: eventColor; }) => Promise<void>
Param |
Type |
data |
{ name: string; color: eventColor; } |
setCompany(data: { name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }) => Promise<void>
Param |
Type |
data |
{ name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; } |
setInt(data: { key: string; value: number; }) => Promise<void>
Param |
Type |
data |
{ key: string; value: number; } |
setString(data: { key: string; value: string; }) => Promise<void>
Param |
Type |
data |
{ key: string; value: string; } |
sendMessage(data: { value: string; }) => Promise<void>
Param |
Type |
data |
{ value: string; } |
setSegment(data: { segment: string; }) => Promise<void>
Param |
Type |
data |
{ segment: string; } |
"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "brown" | "grey" | "black"