(0) exportieren Drucken
Alle erweitern

The Live SDK

Purpose

More and more people are using Microsoft OneDrive as their cloud-based storage. When you build apps that work with OneDrive, you give your users the ability to access their OneDrive files, folders, albums, photos, videos, audio, tags, and comments. To help you create this value and build successful apps that your customers enjoy, we offer the Live SDK—a collection of APIs that help you integrate your apps quickly and easily with compatible services like Microsoft account and OneDrive. Whether you develop apps for Windows, Windows Phone, iOS, or Android, users can work with OneDrive from your apps.

What's new

In addition to the Live SDK, you can use the OneDrive pickers to quickly open files and get share-able links. For more info, see OneDrive pickers.

Live SDK v5.6 support:

  • Windows Runtime apps—Supports both Windows Store apps and Windows Phone Store apps. These APIs are shared among both platforms, giving you the ability to write your app using JavaScript and HTML, or using managed languages like C#/Visual Basic and XAML.

  • Single sign-on for Windows Phone Store apps—The Live SDK provides a Microsoft account single sign-on feature. With single sign-on, users who are already signed in to a Microsoft account on a Windows device will be able to use your app without having to retype their credentials. We have extended single sign-on to work on Windows Phone Store apps. Simply install the Windows Phone SDK 8.1.

    Important  If you use single sign-on, users cannot sign out from your app. They will sign out when they sign out of the device. For more info, see Single sign-on for apps and websites.

  • Background upload/download —Windows Runtime apps, when working with OneDrive, can start file upload and download requests that continue even if the app that started the request is suspended or quits. This feature is known as background transfer. We have added new APIs that your app can call to attach to pending uploads when it's restarted. For more info, see Downloading and uploading files.

  • Microsoft Silverlight 8.1 app support—For Windows Phone Silverlight 8.1 apps, we provide two libraries. One is similar to the library that Windows Runtime apps use, with which you can make use of single sign-on. The other library is for Windows Phone 8, which uses OAuth 2.0. This means that you can continue to create Windows Phone Silverlight 8 apps that use OAuth 2.0 to authenticate users and provide the authorization flow. However, you will not be able to take advantage of the single sign-on feature.

  • Windows Phone 7—The Live SDK v5.6 does not support development on Windows Phone 7.

  • iOS apps—Includes 64-bit support for iOS apps.

To start writing apps that enable users to access their OneDrive files, choose the topic here that matches your platform.

TopicDescription

Windows Runtime apps (HTML)

OneDrive for Windows Runtime apps using JavaScript and HTML.

Windows Runtime apps (XAML)

OneDrive for Windows Runtime apps using C#/VB and HTML.

iOS apps

OneDrive for iOS apps.

Android apps

OneDrive for Android apps.

Web apps

OneDrive for Web apps.

Using the REST API

You can use the REST API to make calls directly to the Live SDK.

 

To learn more about using the Live SDK, working with OneDrive in other apps, and OneDrive core concepts, see these topics.

TopicDescription

Windows desktop apps

OneDrive for Windows desktop apps.

Server-side scenarios

Use server-side scripts to interact directly with the Live SDK.

Core concepts

Follow these concepts and guidelines when accessing a user's OneDrive files from your app.

Single sign-on for apps and websites

Simplify the authentication process by adding single sign-on for apps and websites.

Supported locales

This topic describes which localized languages are supported, for Windows Phone apps.

OAuth 2.0

The Live SDK implements the OAuth 2.0 protocol to authenticate users.

Usage and Authorized Applications guidelines

Live SDK usage and authorized applications guidelines.

 

Developer audience

The Live SDK uses industry-standard protocols such as OAuth 2.0 and JavaScript Object Notation (JSON). To call the APIs, you primarily use Representational State Transfer (REST) requests that return info formatted in JSON. This architecture enables us to support a variety of platforms, including those for web, desktop, iOS, and Android. In addition, there are Microsoft software development kits (SDKs) for developing apps for Windows Phone and the Windows Store.

The Live SDK exposes info from these services:

  • OneDrive for working with documents and media. Your apps can use the Live SDK to create, read, update, and delete a user's folders, files, albums, photos, and videos, and to read, create, and delete any associated tags and comments on OneDrive.
  • Microsoft account for authenticating users and accessing their profile info.

Note that users must be signed in, and has consented to the required scopes, in order to access files and info on OneDrive. For more info, see Scopes and permissions.

Live SDK downloads

Download the Live SDK based on your platform:

Live SDK compatibility with Windows Phone

This table shows which Live SDK versions run on which Windows Phone versions.

This version of the Live SDK ...Supports these Windows Phone versions

Live SDK v5.6

Windows Phone 8, 8.1

Live SDK v5.3, v5.4, v5.5

Windows Phone 7.5, 7.8, 8

Live SDK v5.2

Windows Phone 7.5, 7.8

 

Open standards

When you use open standards, you can spend less time learning new concepts and more time writing code and being productive. That's why the Live SDK is built upon many open standards that you probably already use in apps that you write today. And, if this the first time you've added a social component to an app, it's likely that the code you write with the Live SDK can also be used with APIs from other services.

Before you start coding, it's good to be aware of a few open standards that are important to the Live SDK: OAuth 2.0, Representational State Transfer (REST), and JSON.

  • OAuth 2.0 is the latest version of the OAuth protocol, an open standard for authenticating users' credentials. The Live SDK, along with other social networking APIs, has adopted OAuth 2.0 as its authentication standard. At its core, OAuth 2.0 enables users to be authenticated by the Microsoft account authorization web services without sharing their confidential sign-in credentials with your apps. Although the OAuth 2.0 specification contains info about a variety of authentication scenarios, or flows, the Live SDK focuses on three:

    • The implicit grant flow, for client-server authentication
    • The authorization code flow, for server-to-server authentication
    • The sign-in control flow, an implementation of the implicit grant flow that's specific to Microsoft account, and that enables you to use our APIs to start the authentication process from within your apps

    For more info about OAuth 2.0, see The OAuth 2.0 Authorization Protocol.

    For details about how we use this open standard, see OAuth 2.0.

  • REST is an architectural style that's become popular in web services. Our use of REST makes it easy for you to request users' info through the Live SDK. This REST implementation supports standard HTTP methods like GET, PUT, POST, and DELETE. We also include a few shortcuts to make certain requests even simpler to implement. For example, to get info about the signed-in user, you can use our shortcut me in your request.

    For more info about REST, see Representational state transfer.

    For details about requesting and updating user info, see REST reference.

    Tip  

    Although our REST API handles the bulk of the work, you can use the Live SDK for Windows Store apps, Windows Phone, iOS, and Android, as well as a JavaScript web API, to help make it easier to call our REST API.

  • JSON is a popular way to represent info in web services. The Live SDK exchanges user info in JSON format. For example, when your app requests a user's birth date, that info is returned in a response object that contains birth_day, birth_month, and birth_year structures.

    For more info about JSON, see Introducing JSON.

You can also get started with the Interactive SDK. The Interactive SDK is an online resource where you can see working code use the Live SDK in real time, without having to write any code yourself.

 

 

Anzeigen:
© 2014 Microsoft