Questions tagged [notion-api]

Questions related to the Notion API. The API is REST-based and the officially supported SDK is written in TypeScript.

The Notion API is a JSON-based REST API for working with the Notion application.

It allows you to work with and manipulate data in Databases, Pages, and Properties in your Notion workspace(s).

You can find documentation for the API on Notion's Developer Portal.

The official client is written in TypeScript.

299 questions
2
votes
1 answer

Autohotkey -- click link, alter link, launch link

I'm trying to create an .ahk script that will make life easier with Notion. My colleagues toss Notion links everywhere, and I'd like a script to force these links to open in the app and not in the browser. I know that I need to somehow automatically…
ancepsinfans
  • 123
  • 1
  • 5
2
votes
2 answers

List all shared pages

How can I get a list of all shared with integration pages. The only way I can implement it now is to use Search API. It means that if I want to show to the user a list of their Notion pages on my website after authorization, the user should pick the…
mif
  • 581
  • 6
  • 16
2
votes
3 answers

Adding pages to a multi-column notion database works flawlessly sometimes and gives a validation error sometimes for the same input

Basically, I'm using Postman to send POST requests to https://api.notion.com/v1/pages It works for 70% of the times and rest of the times it gives the following error sometimes. That is, for the same input. { "object": "error", "status":…
Akshaya D N
  • 49
  • 1
  • 4
2
votes
1 answer

How to get the url of a page via the Notion Public API?

As per the official Notion Public API documentation about how to retrieve a page, I can get the page properties and a little amount of metadata (ie. "object", "id", "created_time", "last_edited_time"). How can I obtain the page slug or URL given the…
nilleb
  • 967
  • 6
  • 28
2
votes
3 answers

How to consume Notion API with React

I'm trying to use the new Notion API as a CMS for my personnal website. As a way to improve, i tried to use it with React. But it seems that it does not allow CORS (i use Axios). What is the best way to consume this API ? Use an Express.JS Back-end…
2
votes
1 answer

Notion API [Beta]: Adding users to a workspace and changing their permissions

Is there a way I add users to a workspace and change their permissions (edit, view, etc.)? Does the current version of the API support this?
smol
  • 23
  • 4
2
votes
1 answer

Behavior of `text` property in a page record / property in Notion

Going through the Notion API docs, it mentions the text configuration is same as rich-text-object. In the response for my page, I view the text property as - { "object": "page", "id": "123", "created_time":…
nilshah98
  • 116
  • 6
1
vote
1 answer

Is there a way to provide additional data to Notion's OAuth flow?

I am building a Telegram bot (webhook implemented) to interact with Notion API. I need to link Telegram and Notion users between each other. My Authorization URL from Notion's integration page looks like…
gettmure
  • 29
  • 4
1
vote
0 answers

Unable to retrieve / list database

I am new to notion API and what to get the list of databases using search API. When I execute curl -X POST 'https://api.notion.com/v1/search' -H 'Authorization: Bearer '"$NOTION_API_KEY"'' -H 'Content-Type: application/json' -H…
tbhaxor
  • 1,659
  • 2
  • 13
  • 43
1
vote
1 answer

Confusing NotionAPI Validation Error (Javascript)

I am submitting the following object with my request to notion.pages.create(): { parent: { type: 'database_id', database_id: databaseID }, properties: { Name: { title: [ { type:…
1
vote
0 answers

Is there a way to get recently deleted pages/databased in Notion through their API

Is there a way to get recently deleted pages/databased in Notion through their API? I noticed that there is an archived property on pages and databased and I know that there is a search endpoint that can be sorted by last_edit_time…
Jeffrey He
  • 11
  • 1
1
vote
0 answers

I have been at this error for a long time while building my chrome extention

The error Uncaught TypeError: Failed to resolve module specifier "@notionhq/client". Relative references must start with either "/", "./", or "../". to understand my code notion.js import config from './config.js' import { Client } from…
1
vote
0 answers

Page Permission via Notion API

Is there any way to provide permission to a particular user to a page using Notion API (curl)? Tried multiple endpoints such as update etc , however nothing worked private function grantFullAccessToUser($userEmail, $pageId) { // Prepare the…
1
vote
0 answers

Is there any way to grant a Notion Connection access to all pages in a workspace?

I've begun digging into the Notion API, I created an integration and upon using their search endpoint I realized there were no results coming through. After digging a little deeper it seems their permissions system only allows you to give access to…
0xSharp
  • 11
  • 1
1
vote
0 answers

Notion API token is invalid

A few days back, The Notion access_token suddenly stopped working for many accounts at our Integration (React + Node JS) and returning below error response in Notion REST API: data: { object: 'error', status: 401, code: 'unauthorized', …