@embedhq/js
v0.1.1
Published
This SDK makes it easy to connect end-user accounts to integrations like Dropbox, Slack, HubSpot, and more. For a detailed overview of the auth flow, refer to [the docs](https://docs.useembed.com/). If you're using React (or a React-based framework like N
Downloads
5
Readme
Embed Connect JavaScript SDK
This SDK makes it easy to connect end-user accounts to integrations like Dropbox, Slack, HubSpot, and more. For a detailed overview of the auth flow, refer to the docs. If you're using React (or a React-based framework like Next.js), consider using the React SDK instead.
Installation
Download the SDK from NPM.
npm install @embedhq/js
Usage
First, generate a session token server-side, then use it to call the connect()
function as shown below.
import { Embed } from "@embedhq/js";
const embed = new Embed();
embed
.connect("SESSION_TOKEN")
.then((res) => console.log(res.connectionId))
.catch((err) => console.error(err));