Skip to content
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 1

Crisp native SDK for capacitor

Notifications You must be signed in to change notification settings

Cap-go/capacitor-crisp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0f530c2 · Mar 3, 2025
Feb 8, 2025
Nov 11, 2022
Mar 3, 2025
Apr 30, 2024
Feb 18, 2025
Apr 30, 2024
Feb 8, 2025
Nov 21, 2021
May 22, 2023
Mar 3, 2025
Nov 21, 2021
Jan 24, 2025
Sep 5, 2024
Feb 8, 2025
May 22, 2023
Mar 3, 2025
Dec 3, 2022
Nov 11, 2022
Feb 8, 2025

Repository files navigation

capacitor-crisp

Capgo - Instant updates for capacitor

Crisp native SDK for capacitor

Install

npm install @capgo/capacitor-crisp
npx cap sync

Init

Call configure in your code Before any other method :

import { CapacitorCrisp } from '@capgo/capacitor-crisp';

CapacitorCrisp.configure({websiteID: '******-****-****-****-********'})

iOS

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.

Android Integration

Nothing special to do.

Open chatbox

import { CapacitorCrisp } from '@capgo/capacitor-crisp';

CapacitorCrisp.openMessenger()

API

configure(...)

configure(data: { websiteID: string; }) => Promise<void>
Param Type
data { websiteID: string; }

openMessenger()

openMessenger() => Promise<void>

setTokenID(...)

setTokenID(data: { tokenID: string; }) => Promise<void>
Param Type
data { tokenID: string; }

setUser(...)

setUser(data: { nickname?: string; phone?: string; email?: string; avatar?: string; }) => Promise<void>
Param Type
data { nickname?: string; phone?: string; email?: string; avatar?: string; }

pushEvent(...)

pushEvent(data: { name: string; color: eventColor; }) => Promise<void>
Param Type
data { name: string; color: eventColor; }

setCompany(...)

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(...)

setInt(data: { key: string; value: number; }) => Promise<void>
Param Type
data { key: string; value: number; }

setString(...)

setString(data: { key: string; value: string; }) => Promise<void>
Param Type
data { key: string; value: string; }

sendMessage(...)

sendMessage(data: { value: string; }) => Promise<void>
Param Type
data { value: string; }

setSegment(...)

setSegment(data: { segment: string; }) => Promise<void>
Param Type
data { segment: string; }

reset()

reset() => Promise<void>

Type Aliases

eventColor

"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "brown" | "grey" | "black"

Sponsor this project

Sponsor

Contributors 4