简体   繁体   English

OneNote API和邮递员REST

[英]OneNote API & Postman REST

I'm attempting to use the OneNote REST API . 我正在尝试使用OneNote REST API In order to test the features, I'm tyring to use Postman REST Client . 为了测试功能,我打算使用Postman REST Client 邮递员OAuth 2.0

I am using Postman's built in OAuth 2.0 flow with the following parameters: 我正在使用带有以下参数的Postman内置的OAuth 2.0流:

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

Below you can see the setup I am using for the MS App Dashboard. 在下面,您可以看到我用于MS App仪表板的设置。

在此处输入图片说明

I am able to get the token, but when I attempt to call a REST API endpoint, the API returns "401 unauthorized". 我可以获取令牌,但是当我尝试调用REST API端点时,API返回“ 401未经授权”。

在此处输入图片说明

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 我对范围进行了更多研究,发现了这一点

Looks like I needed to use wl.signin%20office.onenote%20office.onenote_create to get sign in, basic features, and write features. 看来我需要使用wl.signin%20office.onenote%20office.onenote_create来获取登录,基本功能以及编写功能。

I'll leave this post up here so anyone else trying to figure this out can save a few hours! 我会将这篇文章留在这里,以便其他任何人找出来可以节省几个小时!

This looks correct, thanks for posting this. 这看起来是正确的,谢谢张贴。 The scopes are important and must be correct so the user knows what they are allowing the app to access. 范围很重要,并且必须正确,以便用户知道他们允许应用程序访问的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM