OneNote API和邮递员REST [英] OneNote API & Postman REST
问题描述
我正在尝试使用 OneNote REST API .为了测试功能,我打算使用邮递员REST客户端.
I'm attempting to use the OneNote REST API. In order to test the features, I'm tyring to use Postman REST Client.
我正在使用具有以下参数的Postman内置的OAuth 2.0流:
I am using Postman's built in OAuth 2.0 flow with the following parameters:
Authorization URL: https://login.live.com/oauth20_authorize.srf
Access Token URL: https://login.live.com/oauth20_token.srf
Client ID: CLIENT_ID
Client Secret: CLIENT_SECRET
Scope (Optional): wl.signin%20wl.basic
在下面,您可以看到我正在用于MS App仪表板的设置.
Below you can see the setup I am using for the MS App Dashboard.
我能够获得令牌,但是当我尝试调用REST API端点时,API返回"401未经授权".
I am able to get the token, but when I attempt to call a REST API endpoint, the API returns "401 unauthorized".
我这里缺少什么吗?我认为范围是正确的,并且空格字符已正确转义.预先感谢.
Is there something I'm missing here? I think the scope is right, and the space character is properly escaped. Thanks in advance.
推荐答案
I did some more research into the scopes and found this
好像我需要使用wl.signin%20office.onenote%20office.onenote_create
来登录,基本功能和编写功能.
Looks like I needed to use wl.signin%20office.onenote%20office.onenote_create
to get sign in, basic features, and write features.
我将把这个帖子留在这里,以便其他任何想知道的人可以节省几个小时!
I'll leave this post up here so anyone else trying to figure this out can save a few hours!
这篇关于OneNote API和邮递员REST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!