LinkedIn Platform: Announcing Early Access to Our New Javascript API & OAuth 2

At LinkedIn, we believe that every business application would be fundamentally better if it was built over a platform of your professional reputation and relationships.  We first opened our platform last November with our OAuth-based REST APIs on developer.linkedin.com.

Thousands of developers are now building applications over the LinkedIn Platform, and we’ve learned quite a bit from them.  Today, I'm thrilled to announce an early access version of new technology that makes developing an application with LinkedIn even easier: our new, easy-to-use Javascript API.

Early Access: Javascript API

Built on the OAuth 2 User Agent Flow, this is an easy, drop-in component that enables you to add a "Sign In with LinkedIn" button on any web page in just a few minutes. Our new platform is still under development, but we're excited to announce early access to all LinkedIn developers. Please take it for a spin and send us your feedback!

We've tried to make it as easy as possible to add LinkedIn identity and functionality to your web application. You can import our framework with a single script tag:

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: your_api_key_goes_here
</script>

And a sign in button is simply:

<script type="in/login"></script>

Your users will then see a dynamic button that lets them grant your app permission via our improved OAuth user flow:

The new OAuth permissions dialog for LinkedIn

Once you have a user's authorization, you can invoke any LinkedIn REST API with just a few lines of JavaScript. In addition, we’ve upgraded all of our APIs to support JSON, allowing to handle any request directly from the browser.

Here is an example of fetching the current user's professional connections:

IN.API.Connections("me")
.result( function(r) { alert("Just retrieved data on your " + r.values.length + " connections!" ); } )
.error(  function(e) { console.log("An error occurred", e); })

That's all the code required for using our new JavaScript API: you don't need to worry about request signing and many simple scenarios work without server-side changes. To demonstrate the power of our API, Matthew Ng built an "instant" people search demo that works entirely in the browser (the app loads in a single HTML file and calls LinkedIn directly).

Example: Instant Search

We’ve already begun using the Javascript API for our own products.  LinkedIn Signal, which launched last week at TechCrunch Disrupt, uses these new APIs for authentication.

As we build out this platform, we look forward to hearing about your experience with our new API.  You can find full documentation for the early access release on our developer website.  Please try it out and send us feedback. We've got lots of exciting features planned for the future, so stay tuned!