简体   繁体   English

如何从远程应用程序(无SharePoint应用程序)接收SkyDrive Pro REST调用的访问令牌

[英]How can I receive an access token for SkyDrive Pro REST calls, from a remote application (no SharePoint app)

I am trying to do the following: 我正在尝试执行以下操作:

create a web application that does REST calls with JavaScript to a Office365 account on SharePoint to list folders / files on SkyDrive Pro. 创建一个Web应用程序,该Web应用程序使用JavaScript对SharePoint上的Office365帐户执行REST调用,以列出SkyDrive Pro上的文件夹/文件。 I know how to construct the REST calls themselves, but I don't know where I can request an OAuth access_token . 我知道如何自行构造REST调用,但是我不知道在哪里可以请求OAuth access_token

Please note: SkyDrive Pro, not Skydrive (I know how to do that one) 请注意:SkyDrive Pro,而不是Skydrive(我知道该怎么做)

To summup, how do I construct the url to go to the STS of SharePoint and ask for an access_token . 总结一下,我该如何构造URL以转到SharePoint的STS并请求一个access_token

I have already registered for a CLIENT_ID in the app catalog. 我已经在应用目录中注册了CLIENT_ID

Here is a blog that I wrote before few months explaining the entire Auth process using plain HTTP Requests in ASP.net . 这是我几个月前写的博客,解释了在ASP.net中使用纯HTTP请求进行整个Auth过程的过程 This should give you a pretty good idea of all the Url's and steps that you need to perform in JavaScript to get the token. 这应该使您对需要在JavaScript中执行以获取令牌的所有Url和步骤有一个很好的了解。 Once you have the token you can access Skydrive pro like a normal document library using simple list REST API's. 获得令牌后,您可以使用简单的列表REST API像普通文档库一样访问Skydrive pro。 The TemplateId for skydrive pro library is 700. skydrive pro库的TemplateId为700。

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

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