【问题标题】:Can't Connect to Notion API无法连接到 Notion API
【发布时间】:2022-01-13 18:28:38
【问题描述】:

我是乌古尔,

https://developers.notion.com/reference/retrieve-a-database

https://api.notion.com/v1/databases/database_id

我使用“https://www.notion.so/111111111111111111?v=222222222222222”作为数据库 ID。 (http://prntscr.com/22cn4dp)

我使用“Authorization: Bearer $NOTION_API_KEY and Notion-Version: 2021-08-16”作为 cURL。

我将它与 Postman 一起使用,但出现错误。

错误代码:

{
    "object": "error",
    "status": 404,
    "code": "object_not_found",
    "message": "Could not find database with ID: 1111111111111111."
}

我该如何解决?

【问题讨论】:

    标签: api postman


    【解决方案1】:

    您的 Notion-Version 看起来正确,但您的数据库 ID 应该是 Notion 页面 url 之后的内容,即 https://www.notion.so/DatabaseiD。此外,如果您使用 Postman,则应将 Authorization 设置为键入“Bearer Token”,并使用您从集成中获得的 Notion API 密钥找到 here

    【讨论】:

      猜你喜欢
      • 2021-12-07
      • 1970-01-01
      • 1970-01-01
      • 2016-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多