Software Architect / Developer / Microsoft MVP (AI)

Business, LinkedIn API, Prototyping

Exploring the LinkedIn Marketing Developer Platform

A while ago I applied for access to the LinkedIn Marketing Developer Platform. I had a few ideas around automation and wanted to experiment with it. It took a few months to get access and I have only recently got round to looking at it.

What’s APIs are available?

There are a bunch of APIs centred around the main areas:

  • Ads
  • Ad Reporting
  • Lead Generation
  • Matched Audiences
  • Community Management

 

Going into these is beyond the scope of this blog you can find out more information about these here.

What can you do with them?

The Marketing APIs let you perform tasks such as creating and targeting ads, identifying your reach, optimising engagement, generating sales leads, matching audiences and more.

One of the things I was looking to do was automate the extraction of personal account analytics. After some digging around I found this information could be fetched by using the Shares and Social Stream API.

Creating a Developer Account

Like other developer APIs you need to apply for and create a developer account. You need to let LinkedIn know which use cases you intend to implement. It took months for me to get accepted onto the development platform, but I finally got the email.

With the email in hand you can create a Developer Application. As part of your application, LinkedIn determine Product Level access that you should get. Here you can see I was granted access to the Marketing Developer Platform based on my initial application:

Scopes and Permissions

Your application is granted access to several scopes.  These determine the actions your application can take on a user’s behalf:

When you look at an endpoint, it will define the scopes and permissions that your application needs to consume it.

For example, the Shares and Social Stream contains a Social Actions endpoint, this lets you create and read likes and comments on shares.  You can see the required permissions for this here:

I have a problem here as my application wasn’t granted the r_member_social permission.  I need this to let my application read posts, comments, and likes.  I’ll need to phone Jeff Weiner and get that sorted out 😉

Generating a Bearer Token

This doesn’t stop me from testing my applications connectivity to the LinkedIn API though as I do have other permissions with access to other endpoints.  Before you do any of that you need to generate a Bearer Token.

The steps to do that using Postman can be found here. You supply your client id, password and set some other key fields and submit a request to an endpoint.  LinkedIn will then prompt you for your login and password. You can see this here:

When you supply those, you’re returned to Postman with a Bearer Token and can begin testing.

Testing with Postman

One of the quickest tests you can try is to fetch you own account details. You can do this by supplying the following endpoint in Postman: https://api.linkedin.com/v2/me and then clicking Send. You can see this here:

Fetching Account Details

In the above screen shot you can see my name and the unique id for my profile image are returned.  There isn’t a lot you can do with that however and getting access to other member profiles on LinkedIn requires elevated access.

Performing an Organisation Lookup

You can search for Companies using the Organizations endpoint. You pass in the “vanityName” to the following endpoint: https://api.linkedin.com/v2/organizations?q=vanityName&vanityName=<NAME>. Here you can see me passing in “Social Opinion” and the details are retrieved:

OK, so nothing major there but one thing you can do is to use the Organisation Search API to do a search either on Keywords or Facets.

Organization Search API

The Organization Search API helps you find organizations using keywords, industry, location, and other criteria. It then returns a collection of matching organizations. Each entry can contain much of the information available on the organization page within the LinkedIn web platform

Here you can some of the facets that you can filter on:

You can use data like this to help with your analytics and targeting efforts.  For example, targeting companies of a certain size, by location, finding second degree connections by companies or even by industry.

I tried using this endpoint in Postman with an example from the LinkedIn developer documentation:

https://api.linkedin.com/v2/search?q=companiesV2&baseSearchParams.keywords=LinkedIn%20Corporation

It didn’t work…..

It turns out that this is another endpoint that requires you to be on the “select developer” list:

To date, these are the only endpoints I’ve tried and already I am finding the API quite restrictive. It’s looking like I need to request additional permissions but at the time of writing not entirely sure where this is done via the developer portal.  This is a bit of a blocker!

Summary

In this blog post we’ve looked at the LinkedIn Marketing Developer Platform. We’ve explored some of the APIs that are available, how you can create an account and seen how to invoke some of the APIS. We’ve also seen how secure and locked down the API ecosystem is!

JOIN MY EXCLUSIVE EMAIL LIST
Get the latest content and code from the blog posts!
I respect your privacy. No spam. Ever.

2 Comments

  1. Tanvi

    Hi! This is almost exactly the problem I am facing, with the 403 errors saying “Not enough permissions to access …”. Were you able to figure out where we can request these permissions?

    • Comment by post author

      jamie_maguire

      Hi Tanvi!

      I did contact via LinkedIn but to cut a long story short, it looks like you need to be on some kind of preferred supplier list.

      I couldn’t find anywhere or anyone that could grant me the elevated access that I needed (the r_member_social permission).

      I can understand from a business perspective but it effectively locks out developers looking to get to grips with the API.

Leave a Reply