Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kavachos.com/llms.txt

Use this file to discover all available pages before exploring further.

Setup

1

Get credentials

Go to the TikTok for Developers portal and create an app. Under Login Kit, add your redirect URI:
https://your-app.com/api/kavach/auth/oauth/callback/tiktok
2

Configure

lib/kavach.ts
import { createKavach } from 'kavachos';
import { oauth } from 'kavachos/auth';

const kavach = await createKavach({
  database: { provider: 'sqlite', url: 'kavach.db' },
  plugins: [
    oauth({
      providers: [
        {
          id: 'tiktok',
          clientId: process.env.TIKTOK_CLIENT_ID!,
          clientSecret: process.env.TIKTOK_CLIENT_SECRET!,
        },
      ],
    }),
  ],
});
TIKTOK_CLIENT_ID=...
TIKTOK_CLIENT_SECRET=...

Scopes

Default scopes: user.info.basic
ScopeWhat it unlocks
user.info.basicDisplay name and avatar
user.info.profileProfile URL and bio
user.info.statsFollower and video counts
TikTok Login Kit requires app review before production use. During development you can test with sandbox accounts added to your app’s tester list.

Endpoints

MethodPathDescription
GET/auth/oauth/authorize/tiktokRedirect to TikTok
GET/auth/oauth/callback/tiktokHandle callback
Last modified on April 29, 2026