npm.io
5.2.1 • Published 1 week ago

@ujet/websdk-headless

Licence
Version
5.2.1
Deps
0
Size
3.2 MB
Vulns
0
Weekly
0

Headless WebSDK

A prebuilt infrastructure for communicating with your CCaaS servers!

Install

npm install @ujet/websdk-headless --save

Usage

import { Client } from "@ujet/websdk-headless"

async function authenticate() {
  const resp = await fetch("/your-auth-endpoint")
  const data = await resp.json()
  return { token: data.token }
}

const client = new Client({
  companyId: "YOUR-COMPANY-ID",
  tenant: "YOUR-TENANT-NAME",
  authenticate: authenticate,
})