Unable to get companies for LinkedIn API version V2

If you have the access token from the user this is possible in v2 of the LinkedIn API. See:

https://developer.linkedin.com/docs/guide/v2/organizations/organization-lookup-api#acls

The full URL for the basic request would be:

https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*)))

With paging:

https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*)))&start=[...]&count=[...]

And you probably want the organization logo urls as well:

https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*,logoV2(original~:playableStreams,cropped~:playableStreams,cropInfo))))&start=[...]&count=[...]

For linkedin-api-php-client see also: https://github.com/zoonman/linkedin-api-php-client/issues/31


From the docs

Please note the following changes when migrating your app from v1 of the LinkedIn API Platform:

Company Pages and Showcase Pages are now surfaced as Organization and Brand resources, respectively. Both resources are considered "Organizational Entities," and share common fields and similarities in how data is accessed.

URNs uniquely identify organizational entities, and can be generated with existing company or showcase ids:

Organization: urn:li:organization:{company id}

The above code make call the rest api "List all companies that the member is an administrator of". It does not seems have a direct equivalent API available in v2.

Organisation lookup/search APIs seems nearest alternative.

Hope this helps.