It looks like you’re encountering a 403 error when trying to create a comment using the Notion API. This error typically means that the API token you’re using does not have the necessary permissions to access the endpoint. Here are a few steps you can take to troubleshoot and resolve this issue: 1. Check OAuth Scopes: Ensure that the OAuth token you’re using has the necessary scopes to create comments. The required scopes for the Notion API can be found in the Notion API documentation. 2. Verify Integration Permissions: Make sure that the integration you created in Notion has the necessary permissions to access the specific page or database where you’re trying to create the comment. You can do this by going to the Notion page or database, clicking on “Share,” and ensuring that your integration is listed with the appropriate permissions. 3. API Request Headers: Ensure that you’re including the correct headers in your API request, including the Authorization header with the Bearer token and the Notion-Version header. Here’s an example Pipedream component that makes a request to create a comment in Notion: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { notion: { type: "app", app: "notion", }, parent_id: { type: "string", label: "Parent ID", description: "The ID of the page or database where the comment will be created", }, comment: { type: "string", label: "Comment", description: "The content of the comment to be created", }, }, async run({ steps, $ }) { return await axios($, { url: `https://api.notion.com/v1/comments`, method: "POST", headers: { Authorization: `Bearer ${this.notion.$auth.oauth_access_token}`, "Notion-Version": `2021-08-16`, }, data: { parent_id: this.parent_id, rich_text: [ { type: "text", text: { content: this.comment, }, }, ], }, }); }, }); Make sure to replace parent_id and comment with the appropriate values. Also, ensure that your integration has the necessary permissions to create
Thanks! What other scopes are there that it doesn’t have?
Currently we include scopes that required for built-in Pipedream Notion actions. You’ll need to request more scope for your usecase.