1

Get your Secret Key

First, sign up on our Platform and get your Secret Key.

2

Get your Raccoon Passcode

Get your Raccoon Passcode. This is used to identify the end user for which this request is being made for and is linked to their authentication context on different apps.

3

Install Tail SDK

npm install @raccoonai/tail-react
4

Start Using the SDK to Link and Manage your End User Accounts

import * as React from "react";
import { useTailSDK, LinkAppModal } from "@raccoonai/tail-react";

let RACCOON_SECRET_KEY = "<secret-key>"
let RACCOON_USER_PASSCODE = "<raccoon-passcode>"

export default function TailSDK() {
  const tailInstance = useTailSDK({
    secretKey: RACCOON_SECRET_KEY,
    callbacks: {
      onSuccess: (msg) => alert("Success:" + msg),
      onError: (err) => {
        alert("Error : " + err.message);
        console.error(err);
      },
    },
  });

  const [isOpen, setIsOpen] = React.useState(false);

  return (
    <div>
      <button onClick={() => setIsOpen(true)}>Link Uber</button>
      <button onClick={async () => await tailInstance.unlinkApp('uber', RACCOON_USER_PASSCODE)}>Unlink Uber</button>

      <LinkAppModal
        isModalVisible={isOpen}
        onCancel={() => setIsOpen(false)}
        tailInstance={tailInstance}
        raccoonPasscode={RACCOON_USER_PASSCODE}
        app="uber"
      />
    </div>
  );
}
5

Manage Apps and Users

Manage users, apps and user accounts on organisation level from the Console page on the Platform.

Next Steps

Was this page helpful?