SDK Usage #
Authentication Setup #
Create an integration in Notion to get a Client ID and Client Secret for OAuth authentication.
1. Create Integration
- Go to notion.so/my-integrations
- Click New integration
- Enter a name for your integration
- Select the workspace to associate with
- Click Submit
2. Configure OAuth Settings
In your integration settings, go to Distribution and enable Public integration:
https://hotglue.tech/api/auth/callback3. Configure Capabilities
Set the capabilities your integration needs under Capabilities:
// Request minimal capabilities needed for your use case.
4. Get OAuth Credentials
OAuth client ID
— shown in Secrets section
OAuth client secret
— click "Show" to reveal, then copy
// Store these credentials securely — you'll need them for OAuth flow.
Capability Reference
Each capability enables specific actions:
Read content
— search, get pages/databases/blocks
Update content
— update pages/blocks, archive
Insert content
— create pages, append blocks
Read users
— list users, get user info
Grant Page Access
After a user authorizes your integration, they must share specific pages or databases with the integration. The integration can only access content explicitly shared with it via the Share menu → Invite → select your integration.
Scopes #
When users connect their Notion account, they'll be asked to grant some of these permissions, depending on which tools you configured for connection:
read_content
Read pages, databases, and blocks that have been shared with the integration
update_content
Update existing pages, databases, and blocks
insert_content
Create new pages and append content to existing pages
read_users
Read user information from the workspace