0

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}

Sergey
  • 11
  • 2
  • Please tell us what you mean by "user" - Are you looking to get a list of companies from a particular member's profile? – LHM Feb 01 '19 at 17:34
  • 1
    Also, can you confirm that you completed one of the two recommended authorization flows as documented here? https://learn.microsoft.com/en-us/linkedin/shared/authentication/authentication?context=linkedin/consumer/context – LHM Feb 01 '19 at 17:39
  • 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. – Sergey Feb 01 '19 at 17:54
  • Thanks for confirming that, @Sergey - could you add the text of the error message that you are getting to your question? – LHM Feb 01 '19 at 18:18
  • Are you sure that your question is not a duplicate of this one? https://stackoverflow.com/questions/46960458/any-queries-to-the-api-linkedin-com-v2-return-not-enough-permissions-to-access – LHM Feb 01 '19 at 18:20
  • 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} – Sergey Feb 01 '19 at 18:42

1 Answers1

2

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!

  • `Client error: `GET https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee` resulted in a `403 Forbidden` response:` – Sergey Feb 22 '19 at 13:28
  • Sorry I misunderstood and clicked minus, but now seems like I can't undo it – Neekey Nov 06 '19 at 04:25