OneNote API-找不到HTTP资源吗? [英] OneNote API - no HTTP Resource found?

查看:89
本文介绍了OneNote API-找不到HTTP资源吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将此端点称为https://graph.microsoft.com/beta/me/notes/,并且在获取了正确的用户ID的同时,发生了以下错误...根本不知道发生了什么,因为未记录此错误:

I'm calling this endpoint https://graph.microsoft.com/beta/me/notes/, and while the right user id was fetched, the below error occurs... Not sure what's going on at all, as this error is not documented:


{
error: {
code: "UnknownError",
message: "{ "Message": "No HTTP resource was found that matches the request URI 'https://www.onenote.com/api/beta/users('b2909c67-ab0e-45cf-a823-b0f945c22c00')/notes'." }",
innerError: {
request-id: "01b7d80f-aa04-463a-be58-c5a12414e243",
date: "2016-02-27T07:07:06"
}
}
}

-

尝试笔记本时/显然我的OAuth令牌不具有范围-但是,看来oauth令牌注册中不包含注释?

When trying notebooks/ apparently my OAuth token doesn't have the scope - however it seems that the oauth token registration does not include notes?


{
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: Notes.ReadWrite.All,Notes.Read.All",
innerError: {
request-id: "73202234-970e-42c8-a569-eca4266ae75a",
date: "2016-03-01T01:49:32"
}
}
}

推荐答案

由于

This 404-NotFound status code is expected since https://graph.microsoft.com/beta/me/notes is an incomplete uri. It is the entry point for accessing all OneNote resources but the uri is missing the rest of the path (to specify which resource to get).

例如呼叫 https://graph.microsoft.com/beta/me/notes/notebooks获取笔记本列表. 或 https://graph.microsoft.com/beta/me/notes/pages以获得页面列表等.

for e.g. call https://graph.microsoft.com/beta/me/notes/notebooks to get the list of notebooks. Or https://graph.microsoft.com/beta/me/notes/pages to get a list of pages etc.

这篇关于OneNote API-找不到HTTP资源吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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