获取通过其Web API的OneNote页面 [英] Get OneNote pages through its web API

查看:255
本文介绍了获取通过其Web API的OneNote页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图开发一种认为的NodeJS与OneNote的API进行交互。目前我;:M试图检索OneNote的网页的内容(HTML中)

I'm trying to develop a NodeJS that interact with the OneNote API. Currently I;m trying to retrieve the content (the HTML) of the onenote pages.

他使​​用API​​测试版,这应该是www.onenote.com/api/beta/sections/{id}/pages,但我试过很多次都没有成功。我总是得到一个错误响应:

Based on the documentation (http://dev.onenote.com/docs) that is possible using he beta API, which should be www.onenote.com/api/beta/sections/{id}/pages, but I've tried many times without success. I always get an error response:

403
{
  "error":{
    "code":"40004","message":"The OAuth token provided does not have the necessary scopes to complete the request. Please make sure you are including one of the following scopes: Office.onenote_update,Office.onenote_update_by_app,Office.onenote","@api.url":"http://go.microsoft.com/fwlink/?LinkID=400836"
  }
}

我知道API的工作,因为Web客户端是在API参考 present这里效果很好。

如果有人能在这一些启发,我会AP preciated。

If someone could shed some light on this, I would appreciated.

感谢在前进。

P.S。我可以完全访问非测试终点相同的API中。

P.S. I can perfectly access non-beta endpoint in the same API.

推荐答案

您会收到此错误,因为你没有要求(随后有用户许可)读取用户的笔记本的权限,而不是因为它是一个测试版API - 对 /v1.0 的权限和是相同的。

You're receiving this error because you haven't requested (and subsequently had the user grant) read permissions for the user's notebook, not because it is a beta API – the permissions for /v1.0 and /beta are identical.

本文MSDN上解释所有范围为OneNote的API。

This article on MSDN explains all of the scopes for the OneNote API.

这是文章的摘要:


  • 您会希望 office.onenote_update_by_app <​​/ code>如果你只需要创建和调用您的应用程序页面。

  • office.onenote_update 会给你所有用户的OneNote内容全权CRUD访问

  • office.onenote office.onenote_create 将让你访问用户的页面并创建新的页面,但不进行编辑的任何用户的笔记本,节或页面。

  • You'll want the office.onenote_update_by_app if you only need to create and recall pages for your application.
  • office.onenote_update will give you carte blanche CRUD access to all of a user's OneNote content
  • office.onenote and office.onenote_create will let you access a user's pages and create new pages, but not make edits to any of the user's notebooks, sections, or pages.

这篇关于获取通过其Web API的OneNote页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆