Comments (8)
Never mind, I found it, apparently you have to "invite" the integration after "adding" the integration, and have to do this for every page I suppose. It's super non-intuitive but it worked. I was hoping for just superuser access to the entire account. Thanks!
Maybe the error message could display this You need to share the page to the integration
from notion-sdk-js.
Never mind, I found it, apparently you have to "invite" the integration after "adding" the integration, and have to do this for every page I suppose. It's super non-intuitive but it worked. I was hoping for just superuser access to the entire account. Thanks!
from notion-sdk-js.
I believe you are looking for this https://developers.notion.com/reference/post-search
To list all the pages within the integration (and their respective sub pages), don't query anything!
from notion-sdk-js.
I achieve that doing:
const response = await notion.databases.query({
database_id: process.env.NOTION_DATABASE_ID!,
})
Is there any problem using the query?
from notion-sdk-js.
@dastasoft How do I know what the NOTION_DATABASE_ID is?
I tried using notion.databases.list()
and it just returns an empty list, not even a single database.
from notion-sdk-js.
@ckim328 I tried that, it returned nothing:
(async () => {
const response = await notion.search();
console.log("search", response);
})();
Output:
search { object: 'list', results: [], next_cursor: null, has_more: false }
from notion-sdk-js.
@dastasoft How do I know what the NOTION_DATABASE_ID is?
I tried usingnotion.databases.list()
and it just returns an empty list, not even a single database.
I use that same function, the other option is using notion.search because list is being deprecated. If you don't see any database maybe you're not sharing your Notion with an integration, check the initial steps and try with postman the different endpoints before diving into the JS.
from notion-sdk-js.
@dastasoft search()
also returns nothing for me. How does one share with an integration? I never saw that step, and can't seem to find the answer anywhere in the docs.
from notion-sdk-js.
Related Issues (20)
- I am experiencing difficulties logging into Notion on the Windows platform. This issue seems to be affecting the login process, preventing me from accessing my Notion workspace HOT 1
- DatabasePropertyConfigResponse is a local type HOT 2
- Reading a "Person" property from a database entry returns only the first result
- Notion Formula Has a Bug Regarding Time Formatting HOT 3
- npm install ERR! for 'parse-text-from-any-block-type' examples
- How do I get value from blocks.retrieve
- The `punycode` module is deprecated HOT 3
- Missing `request_id` type in `OauthTokenResponse`
- unable to add external to files HOT 1
- multi_select type bug HOT 1
- Error: Insufficient permissions for this endpoint.
- I found the Mar 22, 2024 bug. I caused the problem HOT 5
- NotionS
- Inconsistent type: Cursor for parameters is string|undefined but for responses is string|null HOT 1
- Types from `DatabasePropertyConfigResponse` union require a `description`
- `request_id` missing on types `GetPageResponse`, `QueryDatabaseResponse` and `GetDatabaseResponse`
- AnnotationResponse type not exported
- `UpdatePageReponse` should also contains `url` prop HOT 1
- Title is converting to timestamp format
- Ask AI provides info that doesn't exist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notion-sdk-js.