1
votes

When we get the page content as HTML using one note API Image sources doesn't seem to be working correctly. There is a $value at the end of the image source in HTML content. How do we handle this when the one note page has images?
Ex:

img width="649" height="587" src="https://www.onenote.com/api/v1.0/me/notes/resources/0-7dcd564dd9c2472c82451536349be691!1-AA1F36752D8FDBF!14716/$value" data-src-type="image/png" data-fullres-src="https://www.onenote.com/api/v1.0/me/notes/resources/0-7dcd564dd9c2472c82451536349be691!1-AA1F36752D8FDBF!14716/$value" data-fullres-src-type="image/png" />>

2

2 Answers

3
votes

Have you tried issuing a GET request to that URL (e.g. https://www.onenote.com/api/v1.0/me/notes/resources/0-7dcd564dd9c2472c82451536349be691!1-AA1F36752D8FDBF!14716/$value)? Don't forget to include the Authentication headers.

2
votes

Issue a GET request with the following format:

https://www.onenote.com/api/v1.0/me/notes/pages/*yourpageID*/content?preAuthenticated=true

Essentially, you just pass in the standard query with the argument preAuthenticated=true.