react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

What's the difference between collection ID and database ID? How to get the former?

Open bytrangle opened this issue 3 years ago • 1 comments
trafficstars

Description

I assumed that database ID is collection ID, so I passed it to getCollectionData of the notion-client.

It returned a 400 response.

After further research, I've learned that they are different things. Collection ID can be extracted from recordMap.collection.

A database ID can be parsed from a database url, it follows this pattern:

`https://www.notion.so/{databaseID}?v={viewID}

Is there a way to tell the collection ID from Notion UI, without calling getPage()?

Notion Test Page ID

Link to my public database

bytrangle avatar Jun 23 '22 15:06 bytrangle

The same my question. I tried to extract collection_id from link as copy link view from database but it isn't working.

songhanpoo avatar Mar 25 '24 17:03 songhanpoo