The steps below are taken directly from the OneDrive developer documentation. Please check the source site for the latest updates.
- Go to the Live SDK app management site.
- If prompted, sign in with your Microsoft account credentials.
- If you are not immediately prompted to provide the app's display name and primary language, click Create application.
- Type the app's display name and select the app's primary language.
- Read the Live Connect terms of use and the Privacy and Cookies statement, and then click I accept. A client ID is created and displayed in App Settings. It should look something like this:
00000000603E0BFE
.
- In the Live SDK app management site, select your app and click Edit settings > API Settings.
- Under Redirect URLs, type the redirect domain you will be redirecting users to
- Click App Settings. On the application summary page, the client secret is displayed. It should look something like this:
qXipuPomaauItsIsmwtKZ2YacGZtCyXD
Create your onedrive-config.json
. It needs to contain:
{
"client_id": "YOUR_ID",
"client_secret": "YOUR_SECRET",
"redirect_uri": "YOUR_REDIRECT_URI" // eg, http://dillinger.io/oauth/onedrive
}
Set the following environment variables if adding onedrive-config.json
may present a challenge (when deploying on Heroku for example)
onedrive_client_id=YOUR_KEY
onedrive_client_secret=YOUR_SECRET
onedrive_redirect_uri=YOUR_REDIRECT_URI