Skip to content
Skillv1.0.0

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 phras

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/notion-install-auth/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill notion-install-auth. Copyright stays with the author (MIT).

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 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:

# 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:

# 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

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

Minimal Node.js client — pin the API version and verify before doing real work:

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

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

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

For the complete TypeScript and Python setups — client timeouts, users.list() access checks, per-line notes, and a "what success looks like" checklist — see full setup examples.

Resources

Next Steps

After successful auth, proceed to the notion-hello-world skill for your first page query. From there, share additional databases with the integration through the Connections menu and grant only the capabilities each workflow needs — Notion enforces both the token scope and the per-page share, so widen access deliberately rather than up front.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-notion-install-auth/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-notion-install-auth.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-notion-install-auth",
  "kind": "skill",
  "name": "notion-install-auth",
  "description": "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\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "productivity",
      "notion",
      "authentication",
      "sdk",
      "setup",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/notion-install-auth/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/notion-install-auth/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/notion-install-auth/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Edit,",
      "Bash(npm:*),",
      "Bash(pip:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Notion Install & Auth\n\n## Overview\n\nSet 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`.\n\n## Prerequisites\n\n- Node.js 18+ or Python 3.8+\n- Package manager (npm, pnpm, yarn, or pip)\n- A Notion account (free or paid)\n- Access to [My Integrations](https://www.notion.so/my-integrations) dashboard\n\n## Instructions\n\n### Step 1: Create Integration and Install SDK\n\nCreate an internal integra",
  "cost": {
    "context_tokens": 1026
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-notion-install-auth/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.