I would like to access skyDrive using PHP.
I want to retreive list of files and folders, download, upload and delete files.
I’ve got a microsoft dev clientID and clientSecret.
Can anybody get me started with connecting to skyDrive with OAuth and making use of the API?
Thanks a lot!
This is actually quite a broad question. Here’s hopefully something that will get you started.
json_decode()to create a map of the received data.json_encode().Try the API
Here is an interactive API you can try out live to see the responses.
Making requests
Example (taken from other SO Answer):
Request types: http://msdn.microsoft.com/en-us/library/live/hh243648.aspx#http_verbs
I also recommend you have a look at
curl_setopt()to better understand how to do the different types of requests you’ll be needing, using cURL. (Also this answer on SO has some good explanation on POST vs GET using cURL.)File object
DELETE FILES:
UPLOAD FILES:
DOWNLOAD FILES:
Folder object
RETRIEVE LIST OF FILES:
CREATE FOLDERS:
DELETE FOLDERS:
OAuth 2.0
My experience with OAuth is unfortunately limited. I can only provide some relevant links and advice which I hope will help.
Review the Protocol Overview and consider if you want to implement something yourself, or use a library. Quick Google search gives me:
Some other potentially useful links and guides: