notion-install-auth

Install and configure the Notion API SDK with authentication. Use when setting up a new Notion integration, configuring API tokens, or initializing @notionhq/client in your project. Trigger with phrases like "install notion", "setup notion", "notion auth", "configure notion API", "notion integration setup".

1,868 stars

Best use case

notion-install-auth is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Install and configure the Notion API SDK with authentication. Use when setting up a new Notion integration, configuring API tokens, or initializing @notionhq/client in your project. Trigger with phrases like "install notion", "setup notion", "notion auth", "configure notion API", "notion integration setup".

Teams using notion-install-auth should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/notion-install-auth/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/saas-packs/notion-pack/skills/notion-install-auth/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/notion-install-auth/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How notion-install-auth Compares

Feature / Agentnotion-install-authStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Install and configure the Notion API SDK with authentication. Use when setting up a new Notion integration, configuring API tokens, or initializing @notionhq/client in your project. Trigger with phrases like "install notion", "setup notion", "notion auth", "configure notion API", "notion integration setup".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Notion Install & Auth

## Overview

Set up the official Notion SDK and configure authentication for internal integrations. The Node.js SDK is `@notionhq/client` (npm) and the Python SDK is `notion-client` (pip). Both wrap the Notion API at `https://api.notion.com/v1` using API version `2022-06-28`.

## Prerequisites

- Node.js 18+ or Python 3.8+
- Package manager (npm, pnpm, yarn, or pip)
- A Notion account (free or paid)
- Access to [My Integrations](https://www.notion.so/my-integrations) dashboard

## Instructions

### Step 1: Create Integration and Install SDK

Create an internal integration at https://www.notion.so/my-integrations:

1. Click **New integration**
2. Name it, select the workspace, and choose capabilities (Read content, Update content, Insert content)
3. Copy the **Internal Integration Secret** (starts with `ntn_` or `secret_`)

Install the SDK:

```bash
# Node.js / TypeScript (official SDK)
npm install @notionhq/client

# Python (official SDK)
pip install notion-client
```

### Step 2: Configure Authentication

Store the token in environment variables -- never hardcode it:

```bash
# Set environment variable
export NOTION_TOKEN="ntn_your_integration_secret_here"

# Or add to .env file (add .env to .gitignore)
echo 'NOTION_TOKEN=ntn_your_integration_secret_here' >> .env
```

**Share pages with your integration:** In Notion, open the page or database you want to access. Click the `...` menu, select **Connections**, and add your integration. Without this step, all API calls return `object_not_found`.

### Step 3: Verify Connection

```typescript
import { Client } from '@notionhq/client';

const notion = new Client({ auth: process.env.NOTION_TOKEN });

const me = await notion.users.me({});
console.log(`Authenticated as: ${me.name} (${me.type})`);
console.log(`Bot ID: ${me.id}`);
```

If the bot user is returned, authentication is working.

## Output

- SDK package installed (`@notionhq/client` for Node.js, `notion-client` for Python)
- Environment variable `NOTION_TOKEN` configured
- Integration connected to target pages/databases via Connections menu
- Verified API connectivity with `users.me()` call

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `unauthorized` | Invalid or expired token | Regenerate at notion.so/my-integrations |
| `object_not_found` | Page not shared with integration | Open page > `...` > Connections > add integration |
| `restricted_resource` | Missing capabilities | Edit integration capabilities in dashboard |
| `validation_error` | Malformed request body | Check SDK version and parameter types |
| `rate_limited` | Too many requests (3 req/s avg) | Add exponential backoff; SDK retries automatically |
| `MODULE_NOT_FOUND` | SDK not installed | Run `npm install @notionhq/client` |

## Examples

### TypeScript — Full Setup

```typescript
import { Client } from '@notionhq/client';

const notion = new Client({
  auth: process.env.NOTION_TOKEN,
  timeoutMs: 60_000,
  notionVersion: '2022-06-28',
});

// Verify connection
const me = await notion.users.me({});
console.log(`Connected as ${me.name}`);

// List all users in the workspace
const users = await notion.users.list({});
console.log(`Workspace has ${users.results.length} users`);
```

### Python — Full Setup

```python
import os
from notion_client import Client

notion = Client(auth=os.environ["NOTION_TOKEN"])

# Verify connection
me = notion.users.me()
print(f"Connected as {me['name']} ({me['type']})")

# List all users in the workspace
users = notion.users.list()
print(f"Workspace has {len(users['results'])} users")
```

## Resources

- [Notion API Authorization](https://developers.notion.com/docs/authorization)
- [Create an Integration](https://developers.notion.com/docs/create-a-notion-integration)
- [@notionhq/client on npm](https://www.npmjs.com/package/@notionhq/client)
- [notion-client on PyPI](https://pypi.org/project/notion-client/)
- [API Reference](https://developers.notion.com/reference/intro)

## Next Steps

After successful auth, proceed to `notion-hello-world` for your first page query.

Related Skills

validating-authentication-implementations

1868
from jeremylongshore/claude-code-plugins-plus-skills

Validate authentication mechanisms for security weaknesses and compliance. Use when reviewing login systems or auth flows. Trigger with 'validate authentication', 'check auth security', or 'review login'.

workhuman-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman install auth for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman install auth".

wispr-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow install auth for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr install auth".

windsurf-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install Windsurf IDE and configure Codeium authentication. Use when setting up Windsurf for the first time, logging in to Codeium, or configuring API keys for team/enterprise deployments. Trigger with phrases like "install windsurf", "setup windsurf", "windsurf auth", "codeium login", "windsurf API key".

webflow-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install the Webflow JS SDK (webflow-api) and configure OAuth 2.0 or API token authentication. Use when setting up a new Webflow integration, configuring access tokens, or initializing the WebflowClient in your project. Trigger with phrases like "install webflow", "setup webflow", "webflow auth", "configure webflow API token", "webflow OAuth".

vercel-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install Vercel CLI and configure API token authentication. Use when setting up Vercel for the first time, creating access tokens, or initializing a project with vercel link. Trigger with phrases like "install vercel", "setup vercel", "vercel auth", "configure vercel token", "vercel login".

veeva-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault install auth with REST API and VQL. Use when integrating with Veeva Vault for life sciences document management. Trigger: "veeva install auth".

vastai-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install and configure Vast.ai CLI and REST API authentication. Use when setting up a new Vast.ai integration, configuring API keys, or initializing Vast.ai GPU cloud access in your project. Trigger with phrases like "install vastai", "setup vastai", "vastai auth", "configure vastai API key", "vastai gpu setup".

twinmind-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install and configure TwinMind Chrome extension, mobile app, and API access. Use when setting up TwinMind for meeting transcription, configuring calendar integration, or initializing TwinMind in your workflow. Trigger with phrases like "install twinmind", "setup twinmind", "twinmind auth", "configure twinmind", "twinmind chrome extension".

together-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install Together AI SDK and configure API key for inference and fine-tuning. Use when setting up Together AI, configuring the OpenAI-compatible API, or initializing the together Python package. Trigger: "install together, setup together ai, together API key".

techsmith-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install TechSmith Snagit COM API and register the COM server for automation. Use when setting up Snagit automation, configuring COM interop, or initializing Camtasia batch processing. Trigger: "install techsmith, setup snagit, techsmith COM API".

supabase-install-auth

1868
from jeremylongshore/claude-code-plugins-plus-skills

Install and configure Supabase SDK, CLI, and project authentication. Use when setting up a new Supabase project, installing @supabase/supabase-js, configuring environment variables, or initializing the Supabase client. Trigger with "install supabase", "setup supabase", "supabase auth config", "configure supabase", "supabase init", "add supabase to project".