Question

How can I get a list of company pages that the currently authenticated user has permission to post to?

I have a user that has already been authenticated and authorized in my application but for the life of me, I can't figure out how to get the company pages he can post to, so that he can share updates to his pages from within my application.

I am not interested in which companies the user worked for, just the company pages he can post to.

I can see in the docs how to post to a company page after I get its ID but my problem is getting the ID.

Can anyone point me in the right direction, please?

Was it helpful?

Solution

As is usual in these things, after hours of searching and ending up posting a question on SO, I found the answer - and in another SO question: How to fetch admin profile details of a company page using Company API - Linkedin

A list of all the companies the user is admin for can be obtained here: https://api.linkedin.com/v1/companies?is-company-admin=true

This is actually mentioned in the API docs but I didn't pay much attention to that page because I assumed it was all dealing with getting information about pages for which you already had the ID. Assumption - still the mother of all f$%& ups.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top