import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
notion_api_key: {
type: "app",
app: "notion_api_key",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.notion.com/v1/users/me`,
headers: {
Authorization: `Bearer ${this.notion_api_key.$auth.api_secret}`,
"Notion-Version": `2021-08-16`,
},
})
},
})
Notion (API Key) uses API keys for authentication. When you connect your Notion (API Key) account, Pipedream securely stores the keys so you can easily authenticate to Notion (API Key) APIs in both code and no-code steps.