Export (0) Print
Expand All

JavaScript reference (Windows Store app and web)

The Live SDK JavaScript API (Windows Store app and web) and the REST reference, enables apps to read, update, and share user data by using JavaScript. It provides methods for signing users in and out, getting user status, subscribing to events, creating UI controls, and calling the Representational State Transfer (REST) API.

The WL object is a global object that encapsulates all functions of the Live SDKJavaScript API (Windows Store app and web). Your app uses the WL object to call all of the Live SDKJavaScript API functions.

Note  All of the following functions apply to both Windows Store apps and web apps unless otherwise noted.

This section contains the following topics.

Topic Description
Using the JavaScript Library

Shows how to include the Live SDK JavaScript API in your app.


Enables you to make calls to the Live SDK REST API.

WL.backgroundDownload (Windows Runtime app)

Makes a call to download a file from Microsoft OneDrive.

WL.backgroundUpload (Windows Runtime app)

Makes a call to upload a file to OneDrive.


Specifies whether the current user can be signed out of his or her Microsoft account.


Creates a background transfer operation to download a file from OneDrive.


Creates a background transfer operation to upload a file to OneDrive.

WL.download (web)

Makes a call to download a file from OneDrive.


Subscribes to an event.


Unsubscribes from an event.

WL.fileDialog (web)

Displays the OneDrive file picker, which enables JavaScript-based web apps to display a pre-built, consistent user interface that enables a user to select files to upload and download to and from his or her OneDrive storage location.


Gets current pending background download operations.


Gets current pending background upload operations.


Gets the user's status as he or she is signing in.


Gets the session object for the user.


Initializes the Live SDKJavaScript API.


Signs a user in or requests additional permissions.


Signs a user out.


Enables you to display UI elements, such as the Microsoft account sign-in button and the OneDrive file picker, in your app.

WL.upload (web)

Makes a call to upload a file to OneDrive.

JSONP Scenarios

Shows how to use JavaScript Objection Notation with padding (JSONP) in client-side JavaScript webpage code to interact directly with the Live SDK REST API.




© 2015 Microsoft