I'm using the code example on notion doc, but it raise the 400 error how to fix it?
below are the code I'm using:
import requests
toggle_heading = 'https://api.notion.com/v1/blocks/{my_blockid}/children'
headers = {
'Authorization': 'Bearer {my_token}',
"accept": "application/json",
"Notion-Version": "2022-06-28",
"content-type": "application/json"
}
r = requests.patch(toggle_heading, headers = headers)
print(r.status_code)
------------
raise 400
the code was copy from:
https://developers.notion.com/reference/patch-block-children