OneNote API default location when creating a page

Rizza 96 Reputation points
2023-06-05T06:18:32.4366667+00:00

I'm using the OneNote API for a browser extension to create a page in OneNote. I'm learning JavaScript, and I'm not quite up to the task of using React sample code for the section picker, so I'm just trying to use a POST request on https://graph.microsoft.com/v1.0/me/onenote/pages. It works, but how do you set this default location? I know I could set the notebook/section rather than using ...onenote/pages, but again, I'm not quite up to that coding challenge yet of getting that choice from the user.

Using the pages API, it's currently saving to the Quick Notes section of my Username Notebook, which I don't use. I tried changing the Quick Notes section setting in the options of the Windows app, but that doesn't seem to impact the API. I was really hoping the user could set a default location outside my browser extension until I'm ready to pull in the sample code for the section picker.

OneNote
OneNote
A family of Microsoft products that enable users to capture, organize, and reuse notes electronically.
177 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,277 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,689 questions
0 comments No comments
{count} votes