简体   繁体   中英

OneNote API & Postman REST

I'm attempting to use the OneNote REST API . In order to test the features, I'm tyring to use Postman REST Client . 邮递员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

Below you can see the setup I am using for the MS App Dashboard.

在此处输入图片说明

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

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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