How to Get a LinkedIn API Access Token in 2020
Updated November 2020 to reflect new LinkedIn changes for v2
Updated July 2019 to reflect new LinkedIn changes
Are you trying to create a LinkedIn application and use LinkedIn’s API? In this article, I will show you how to get a LinkedIn API access token with OAuth2 and sign in with LinkedIn. LinkedIn’s own Authenticating with OAuth2 contains an overview of how to get authenticated. I will walk you through some examples of how you can enable LinkedIn sign in through your own developer app and use the LinkedIn API access token to get information about your profile.
Before going into authentication, make sure that you have the right permissions for the kind of LinkedIn API endpoints you hope to call. For example, if you plan on managing a company page, you will need to have admin access to the page. Browse through the header tabs on LinkedIn’s developer page to see what you will need for your application. Note that LinkedIn access tokens now require LinkedIn Developer Enterprise access. Due to this change, we will primarily focus on the Sign In with LinkedIn app permission.