简体   繁体   中英

How can I get the clientID and redirect URI to access files from onedrive in my angular application

I am developing an angular application. In my application I need files to be accessed from onedrive. I read their articles and found that I need to register an application before accessing WL API's.

I created an application as described in this link https://msdn.microsoft.com/EN-US/library/office/dn659750.aspx .

I am developing angular application locally so I gave localhost or 127.0.0.1 as my redirect URL. But it is throwing the below error when I save the registered application.

"You must enter a valid domain - query strings are not allowed. Length is limited to 248 characters".

What should I specify in the redirect URL if I am developing the application locally? Specifying localhost or 127.0.0.1 in redirect URL is throwing the above error.

In this case, you'll want to leave the redirect URL on the application management site blank and follow the steps outlined on https://msdn.microsoft.com/EN-US/library/office/dn631817.aspx . There's a special redirect URL ( https://login.live.com/oauth20_desktop.srf ) that is used to retrieve the access token. I hope that helps.

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