Sergey
Sergey

Reputation: 11

Linkedin API get user Companies

We are switching our application to the V2 API. We had difficulties with the publication of posts on the companies page. To send, it is required company ID, we want to get a list of user's companies using a request to the end point: https://api.linkedin.com/v2/search?q=companiesV2

In response, we receive a message about the lack of rights. What are we doing wrong?

With Authenticating, everything is fine, I get information about the user. I want to get a list of companies where an authenticating user is an administrator.

Here is scope 'r_liteprofile', 'r_basicprofile', 'r_emailaddress', 'w_member_social', 'w_share', 'rw_company_admin' that I use when authenticating a user.

request GET https://api.linkedin.com/v2/search?Q=companiesV2

response {"serviceErrorCode": 100, "message": "Not enough permissions to access: GET-companiesV2 / search", "status": 403}

Upvotes: 0

Views: 2939

Answers (1)

Peter van Mourik
Peter van Mourik

Reputation: 223

If you want to list the companies a user is administrator of, you have to use the Organisation Access Control endpoint. With this endpoint you can list all the companies the authenticated user is admin of: https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee.

You can check the documentation here: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-access-control.

Hope this helps!

Upvotes: 2

Related Questions