This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@codat/link-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Codat Embedded Link SDK

🚧 Deprecated

This beta Link SDK is deprecated. See our docs for the latest on deploying a Codat auth flow.

Full documentation can be found here

Prerequisites

You should use React 17 or 18 when embedding the Link component into your webpage or application.

Getting started

You can install this library using npm:

npm i @codat/link-sdk

After installing the library, instantiate it in your own project:

import { CodatLink } from '@codat/link-sdk';
import '../node_modules/@codat/link-sdk/index.css';

Embedding the Link application

The component requires a companyId parameter to open Link for a specific company. To obtain the companyId, first create a Codat company for your customer. We recommend doing that at the same time as your SMB customer signs up within your app.

From the response to company creation, retain the companyId parameter. Then, initialize the Codat Link component in your app:

<CodatLink
    companyId="a00a0a00-0a0a-a0aa-0000a00aa00a"
    onConnection={(id) => alert('Success: Connection ' + id + ' established')} // Called each time a connection is established
    onClose={() => alert('Closed')} // Called when the user clicks 'X'
    onError={(err) => alert('Error: ' + err)} // Called when an error is reached
    onFinish={() => alert("Finished")} // Called when user completes the whole flow
/>

Getting help

To report issues with this library, please get in touch with us.

Pitfalls

  • Disable React.StrictMode
  • The Embedded Link component is not optimized for use on mobile devices.

Readme

Keywords

none

Package Sidebar

Install

npm i @codat/link-sdk

Weekly Downloads

56

Version

1.1.1

License

MIT

Unpacked Size

504 kB

Total Files

158

Last publish

Collaborators

  • codat-engineer
  • lucy-m
  • mcclowes
  • tigerswithguitars