1

I'm having problem to get all the Database entries when I call the API call. When I call it just return me a few databases.

async function getDatabases(item){
      if(item.object == 'database')
            console.log(item)
}

async function listAllDatabases(){
    const response = await notion.search({
        sort: {
            direction: 'ascending',
            timestamp: 'last_edited_time'.
        },
     });
    response.results.forEach(getDatabases)
 }
mplungjan
  • 169,008
  • 28
  • 173
  • 236

1 Answers1

0

You need to share those databases with your integration in Notion first.

Nick McCurdy
  • 17,658
  • 5
  • 50
  • 82