https://github.com/Cap-go/capacitor-crisp
Crisp native SDK for capacitor
https://github.com/Cap-go/capacitor-crisp
android capacitor capacitor-plugin crisp ionic ios
Last synced: 11 months ago
JSON representation
Crisp native SDK for capacitor
- Host: GitHub
- URL: https://github.com/Cap-go/capacitor-crisp
- Owner: Cap-go
- Created: 2021-11-20T00:08:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T00:57:51.000Z (11 months ago)
- Last Synced: 2025-05-05T07:29:16.085Z (11 months ago)
- Topics: android, capacitor, capacitor-plugin, crisp, ionic, ios
- Language: Swift
- Homepage: https://www.npmjs.com/package/capacitor-crisp
- Size: 971 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-capacitorjs - @capgo/capacitor-crisp - Crisp chat SDK for your app. (Plugins / Community Plugins)
- awesome-capacitor - Crisp - Native SDK for customer messaging and chat support. ([Capgo plugins](https://capgo.app/) / Communication & Messaging)
- awesome-ionic - capacitor-crisp - Crisp native SDK for capacitor. (Capgo Capacitor Plugins)
README
➡️ Get Instant updates for your App with Capgo 🚀
Fix your annoying bug now, Hire a Capacitor expert 💪
Crisp native SDK for capacitor
## Install
```bash
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)
* [`openMessenger()`](#openmessenger)
* [`setTokenID(...)`](#settokenid)
* [`setUser(...)`](#setuser)
* [`pushEvent(...)`](#pushevent)
* [`setCompany(...)`](#setcompany)
* [`setInt(...)`](#setint)
* [`setString(...)`](#setstring)
* [`sendMessage(...)`](#sendmessage)
* [`setSegment(...)`](#setsegment)
* [`reset()`](#reset)
* [Type Aliases](#type-aliases)
### configure(...)
```typescript
configure(data: { websiteID: string; }) => Promise
```
| Param | Type |
| ---------- | ----------------------------------- |
| **`data`** | { websiteID: string; } |
--------------------
### openMessenger()
```typescript
openMessenger() => Promise
```
--------------------
### setTokenID(...)
```typescript
setTokenID(data: { tokenID: string; }) => Promise
```
| Param | Type |
| ---------- | --------------------------------- |
| **`data`** | { tokenID: string; } |
--------------------
### setUser(...)
```typescript
setUser(data: { nickname?: string; phone?: string; email?: string; avatar?: string; }) => Promise
```
| Param | Type |
| ---------- | ------------------------------------------------------------------------------------ |
| **`data`** | { nickname?: string; phone?: string; email?: string; avatar?: string; } |
--------------------
### pushEvent(...)
```typescript
pushEvent(data: { name: string; color: eventColor; }) => Promise
```
| Param | Type |
| ---------- | --------------------------------------------------------------------------- |
| **`data`** | { name: string; color: eventColor; } |
--------------------
### setCompany(...)
```typescript
setCompany(data: { name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; }) => Promise
```
| Param | Type |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`data`** | { name: string; url?: string; description?: string; employment?: [title: string, role: string]; geolocation?: [country: string, city: string]; } |
--------------------
### setInt(...)
```typescript
setInt(data: { key: string; value: number; }) => Promise
```
| Param | Type |
| ---------- | -------------------------------------------- |
| **`data`** | { key: string; value: number; } |
--------------------
### setString(...)
```typescript
setString(data: { key: string; value: string; }) => Promise
```
| Param | Type |
| ---------- | -------------------------------------------- |
| **`data`** | { key: string; value: string; } |
--------------------
### sendMessage(...)
```typescript
sendMessage(data: { value: string; }) => Promise
```
| Param | Type |
| ---------- | ------------------------------- |
| **`data`** | { value: string; } |
--------------------
### setSegment(...)
```typescript
setSegment(data: { segment: string; }) => Promise
```
| Param | Type |
| ---------- | --------------------------------- |
| **`data`** | { segment: string; } |
--------------------
### reset()
```typescript
reset() => Promise
```
--------------------
### Type Aliases
#### eventColor
"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "brown" | "grey" | "black"
