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
0
votes
1 answer

Unable to filter, paginate, or add any data to Notion API query from python code

I've been trying to query the Notion API using Python, and as I have more than 100 results, I need to either filter them down or be able to paginate. I tried different variants of the following code to no avail: headersNotion = { "Authorization":…
Ali
  • 3
  • 1
  • 7
0
votes
1 answer

Notion API OAuth Not working `invalid client`

I've tried setting up Notion OAuth and everything works fine on postman but on my application it's not. I've tried many ways and this is the last implementation I've did so far. router .get("/notion/authorize", async (req : Request, res: Response)…
Lakshya
  • 190
  • 1
  • 12
0
votes
1 answer

Notion Api GET request Fail to pull data

I'm trying to pull data from a notion database and only able to get 1st row. Anybody that can point me in the right direction?
0
votes
1 answer

Notion js SDK asks for title even after title is provided

I am trying to create a database using notion sdk and in this is what my payload looks like: parent: { type: "page_id", page_id: process.env.PAGE_ID, }, icon: { type: "emoji", emoji: "", }, title: [ { type:…
DarthCucumber
  • 101
  • 1
  • 8
0
votes
1 answer

Internal Notion URL for Image Blocks (Type= File) not working

I have created a Python script to split Notion pages based on specific logic. This works great for all block types except Image. I get the following error: {"object": "error", "status": 400, "code": "validation_error", "message": "body failed…
0
votes
0 answers

Wordpress div text value to PHP Plugin and return different value

I have an embedded interview (like a contact form) on WordPress, I use an on click function to set a text value of a div to the name of that interview's input field that has focus. I have created a PHP plugin who's purpose is to get the name from…
0
votes
1 answer

Trying to send Query to Notion API using PHP

I am trying to query a Notion Database using the Notion API and PHP. I am able to connect to the API no problem, however it seems my POST request is being ignored and I just get a swath of data which doesn't help me at all. Notion's API…
Brendon
  • 29
  • 6
0
votes
2 answers

I can't update blocks in Notion API

How can I update my block with Notion? I've tried to follow the instructions on how to update the API but failed. Even when using requests.patch, the response text doesn't change. Here's the code: import json, requests import dotenv, os def…
0
votes
1 answer

How do I change the block type using the Notion SDK or API?

I'd like to change, for example, an existing block's type from 'paragraph' to 'heading_2' or any of the other blocks mentioned here. I've tried the update method. But it just throws the error, 'Expected block type paragraph in request body' if I try…
nirinsanity
  • 141
  • 1
  • 5
0
votes
0 answers

Notion API Get database : guest limitations?

I'm using Notion API to display a collection of photos in a react app (using graphql). For that I've created a simple database in notion, with basic information (title, status, tags, category, photo url). Everything is fine with my test set of data.…
0
votes
2 answers

SyntaxError: The requested module '@notionhq/client' does not provide an export named 'Client'

I'm following Notion's instructions to use the Notion API. From the terminal, I have installed the client library ("npm install"). The problem is when I run the script ("node index.js") I get the following error message: import { Client } from…
Green
  • 507
  • 10
  • 20
0
votes
1 answer

Error while updating a Page property in Notion gives error

Using the documentation of Notion in here, I am trying to update a page property on a database in my personal Notion. The code is the following The error is the following
rpf
  • 3,612
  • 10
  • 38
  • 47
0
votes
1 answer

Is it possible to create a button or a link to call notion api inside notion?

When you open a page from a database in notion, the properties are listed at the top of the page. I want to be able to modify those properties from inside the page. For example, the template of the page could be a set of questions to answer by yes…
jcollin.be
  • 300
  • 1
  • 2
  • 6
0
votes
1 answer

Notion API - Notion database model is also a block?

https://developers.notion.com/reference/block A block object represents content within Notion. Blocks can be text, lists, media, and more. A page is a type of block, too! As far as i know, everything in Notion is a block, a page is a block has…
0
votes
2 answers

Create Page body.parent undefined

I'm trying to create a Notion page using API but keep getting error body failed validation: body.parent should be defined, instead was undefined. I'm using an edited version of actual cURL code snippet from the documentation. Clearly the parent is…