Paolito75
Paolito75

Reputation: 568

LinkedIn API : get company datas

I need to develop a new PHP script which connects to my LinkedIn company page and then backup some datas. I read the official documentation on company pages management and the one about the OAuth2, but why should I use it ?

enter image description here

I don't understand : I don't want people to login on my website thought their linkedin account, I only need to connect to my company page in order to grab some datas.

PS : I already created an application on https://developer.linkedin.com/my-apps. What URL should I request with the "Client ID" and "Client Secret" keys ? I'm lost

Upvotes: 0

Views: 379

Answers (1)

Kenneth Keith
Kenneth Keith

Reputation: 11

LinkedIn requires you to use OAuth2.

A workaround for this is to authenticate under your account or your company account, get the access token, and store it in a database. The application then reads the token from the database to be submitted with any API calls, bypassing the need for users to authenticate themselves when they hit the website. This will allow you to display the company updates from LinkedIn on your homepage without prompting visitors for OAuth2 login.

If you take this approach, the token expires every 90 days and needs to be renewed. Depending on the amount of traffic you get, it might also be worthwhile to look into caching the API response so you're only making an API call every hour or so. Your developer account limits the number of API calls you can make in 24 hours, and if you exceed the threshold you will be locked out of making any additional requests until the following day.

Upvotes: 1

Related Questions