【问题标题】:Notion API search method returns nothingNotion API 搜索方法不返回任何内容
【发布时间】:2021-11-20 07:13:46
【问题描述】:

我正在尝试获取我的 Notion 工作区的所有页面,但是当我的个人工作区中有页面时,搜索方法返回一个空响应。

代码:

import { Client, LogLevel } from '@notionhq/client'

const notion = new Client({
  auth: '<hidden>',
  logLevel: LogLevel.DEBUG
})

const databasesQuery = await notion.search({})
console.log(databasesQuery)

输出

@notionhq/client info: request start { method: 'post', path: 'search' }
@notionhq/client info: request success { method: 'post', path: 'search' }
{ object: 'list', results: [], next_cursor: null, has_more: false }

【问题讨论】:

    标签: notion-api


    【解决方案1】:

    很抱歉回复晚了,但我遇到了同样的问题。

    我认为这是因为您没有与集成共享任何页面。据我从我自己的测试中知道,您必须 share 每个页面与您的集成搜索请求才能工作,即使它是您自己的概念工作区:/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-10-21
      • 2021-07-31
      • 2012-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多