2

Hi I'm developing a wcf web service that integrates with OneDrive and I need to access to the files (list, delete, download and upload) of the users that use my web service.

Is there a way to use Onedrive in an easy way? maybe some C# API... I found the Live SDK but I can't understand how to use it, then there is SkyNet but I don't know how to use it and if it works with OneDrive.

In case I would have to use REST calls, can you explain how to authenticate and list file with REST? thank you all

Cardella
  • 335
  • 1
  • 4
  • 13
  • This is not a great question for StackOverflow. You need to do some research on your own, we will not do it for you. – tnw Apr 08 '14 at 20:16
  • Well you are right but I'm asking here because i wasn't able to find anything. Stqckoverflow is my last chance – Cardella Apr 10 '14 at 05:30

1 Answers1

1

The main challenge you'll have with writing a WCF service is doing authentication. I'm not aware of a straightforward way to proxy authentication with your WCF service into the OneDrive service. The easiest approach would be to have the caller of the WCF service handle generating the auth token (see the examples for how to generate an auth token in the OAuth reference) and pass it to your service as one of the call parameters.

After that, you can use the Live SDK to make server-side calls using the token provided to your service from the caller as a parameter to your WCF method. You can either use the Live SDK to generate those calls, or you can make them yourself following the REST reference. Neither give you an object model that you can interact with, you'll need to understand how the REST service works and the structure of the returned JSON data to use the Live SDK.

Ryan Gregg
  • 2,015
  • 13
  • 16
  • I forgot about this question, thank you for the help, I almost finished my project and it would be great to add onedrive functionality. I like your advice, so the client calls a RequestToken() method passing the authorization code, then my service will exchange that code with new tokens. Stay tuned because I could need your help :D – Cardella Jul 31 '14 at 21:04