Notion released API into public beta yesterday and I just started exploring it. For my non technical readers I would like to explain that Notion is just an Advanced version of a note taking tool. Just like OneNote and Evernote but Better!!
I just love notion. My life is organized around notion and this is the organizer app that I have used the most till now. According to me notion is the best at doing things it does and no other tools can take its place. I have other article about my high productive notion template check it out here.
In this post I will give a small tutorial of playing with Notion API using Postman & Notion.
Notion API is similar to any other API. You need a secret key from the notion it is very easy to create and with this we will be able to integrate our own app into notion. Using notion API involves below steps –
Create an Integration App
Navigate to Settings & Members > Integrations > Click on Develop your own Integrations. This will take you to a page where you will be asked to create New Integration Click on New Integration.
Give name for the integration and select the workspace
After clicking on submit. Copy the secret key. We will need this for connecting to Notion.
Create a Page with Database & Share with Integration
Now create a Notion page and Share it with the Integration that we created.
Also copy the database id and save it. We will need this id so that we can contact with this database.
Make a http Request
Now we will make a Post request for creating data in this table.
Before that we need to set Authorization in Postman. Open new tab there select Authorization as Bearer Token and set the value of the secret that we copied earlier.
Add Header Notion-Version = 2021-05-13
Now set method to POST and enter url https://api.notion.com/v1/pages and the below text in body as Json
and click send. The request will be executed. You will see response status as OK and the record will be created in the notion database.
This was it folks see you in the next post