For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Talk to usGet started
OverviewAPI Reference
OverviewAPI Reference
    • Introduction
    • Quick Start
  • Integrations
    • Overview
    • Custom Automations
    • Using Our Actions
    • Using Our Webhooks
Logo
Talk to usGet started
On this page
  • Add Keet Link to Your Product
  • Step 1: Get a Link Token (Server side)
  • Step 2: Make the Keet Link Appear (Client side)
  • Step 3: Swap publicToken for accountToken (Server Side)
  • You’re done!
  • Check out how to use your integrations

Quick Start

Was this page helpful?
Previous

Overview

Next
Built with

Add Keet Link to Your Product

If you get stuck at any point, email for help at zack@trykeet.com. If you don’t get a response in 10 minutes, we’ll buy you coffee.

Keet link uses a series of token exchanges to authenticate your users accounts.

    Step 1: Get a linkToken so that you can initialize a link session for your users

    Step 2: Make Keet Link appear in your frontend using the linkToken

    Step 3: Swap the publicToken, returned by keetLink for an accountToken

    Step 4: Use the accountToken for future requests to authenticated sessions.

Step 1: Get a Link Token (Server side)

In your backend, set up a POST request to initialize a Keet Link session and get a linkToken from this URL: https://api.trykeet.com/v1/link/token

Supported Integrations
  • Instagram
  • LinkedIn
  • Amazon
  • Amazon Business
  • Amazon Seller
  • X
  • Venmo
  • Facebook
  • WhatsApp
  • Uber
POST
/v1/link/token
1curl -X POST https://api.trykeet.com/v1/link/token \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "linkConfig": {
6 "endUserId": "<userId>",
7 "integration": "Instagram",
8 "companyLogoUri": "https://example.com/logo.png"
9 }
10}'
Try it
Response
1{
2 "status": "ok",
3 "linkToken": "<token>"
4}

You can now pass this public linkToken back to your client to initialize the link component.

Step 2: Make the Keet Link Appear (Client side)

React
HTML/JS
React Native (Mobile)
  1. Install the link sdk: npm install @keet-tech/react-keet-link

  2. Use the linkToken from Step 1 to open Keet link

1 import { useKeetLink } from "@keet-tech/react-keet-link"
2 import { useEffect, useState } from "react"
3
4 export default function App() {
5 const onSuccess = (publicToken: string) => {
6 /* send a request to your backend
7 to exchange this for an account token */
8 }
9
10 const onValidationError = (errors: any) => {
11 console.error("An error from Keet Link occured: ", errors)
12 }
13
14 const { open, isReady } = useKeetLink({
15 linkToken: "ADD YOUR LINK TOKEN -- SEE STEP 1",
16 onSuccess,
17 onValidationError
18 })
19
20
21
22 return (
23 <button disabled={!isReady} onClick={open}>Open Link</button>
24 )
25 }
26
27 export default App;

Step 3: Swap publicToken for accountToken (Server Side)

In your backend, create a request to exchange the short-lived publicToken for a permanent accountToken.

POST
/v1/linked-accounts/token
1curl -X POST https://api.trykeet.com/v1/linked-accounts/token \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "publicToken": "..."
6}'
Try it
Response
1{
2 "status": "ok",
3 "accountToken": "acc_..."
4}

Store this account token someplace secure. It is used to make all requests to this end users authenticated sessions.

You’re done!

Use the accountToken to make all future requests on behalf of the user to every integration they use.

Check out how to use your integrations

Integration Overview