Terence Eden
Terence Eden

Reputation: 14304

365 API to run OneDrive on Linux?

(Asking here as per the instructions at http://blogs.office.com/2014/05/08/develop-using-onedrive-for-business-with-the-new-office-365-apis/)

I'm trying to run OneDrive on an Ubuntu machine. Using https://github.com/xybu/onedrive-d/ I'm asked to OAuth against the following URL:

https://login.live.com/oauth20_authorize.srf?display=touch&client_id=000000004010C916&locale=en&scope=wl.skydrive+wl.skydrive_update+wl.offline_access&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf&response_type=code

However, because I'm using Office 365, my corporate account isn't recognised as a "live" account.

So, my question is two-fold.

  1. Is there an OAuth URL for login.microsoftonline.com/ (where I usually log in)?
  2. If not, are there APIs which will allow me to pull a directory listing, upload files, etc? Bonus - any Python libraries?

Upvotes: 1

Views: 1630

Answers (1)

Ryan Gregg
Ryan Gregg

Reputation: 2035

All the details for how to call the REST API directly for OneDrive and OneDrive for Business are available on dev.onedrive.com. In particular, you can read more about auth here: dev.onedrive.com/auth/readme.md.

For OneDrive for Business, you can use this OAuth URL: https://login.microsoftonline.com/common/oauth2/authorize

We also have a Python SDK available: https://github.com/onedrive/onedrive-sdk-python.

Upvotes: -2

Related Questions