1

I'm quite a newbie on SharePoint.

I've a server with SharePoint Foundation 2013 installed.

We have also a company website, not based on SharePoint and hosted on another server in our network. The website is made with ASP.NET MVC.

Some of our dealers are outside the local network, and they are not familiar to SharePoint. So we are thinking to create a reserved area on our website (protected by login), where files/folder (that are saved in a SharePoint document library) are made available to our dealers. We will develop this area with a custom and simple design and a search form, so outside the SharePoint environment. A dealer will be able to browse folders and download files (pdf or jpg).

I know SharePoint has REST web services available and I've seen this one (credits to Vadim Gremyachev Get all Files and Folders in one call) to get files and folders from a Document Library:

https://server/_api/Web/GetFolderByServerRelativeUrl(<folder url>)?$expand=Folders,Files

At the moment I've tried to open this web service on my browser (and it doesn't return a list of folders and files, but it responds) and I've tried to use Postman but it returns 401 Unauthorized error.

My questions are: is it possible to use JavaScript/jQuery to call this web service from another domain? Is oAuth needed for this scenario? C# code of my website can be a different solution to authenticate to my SharePoint and make REST calls always from another server?

PS: I don't need to hide/show data based on which user is logged in.

Thanks for your suggestions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.