Search code examples
linkedin-api

In LinkedIn API v2.0, how to get company/list by person's token


In LinkedIn API v2.0, how to get company/list by person's token,the api of v1.0 is v1/companies:(id,name,logo-url)


Solution

  • As described in the LinkedIn Company Pages v1 to v2 API Migration Guide , in the section List companies where member has a role, you can use the endpoint with the projection using the schema definition described here fro the mapping, as example:

    curl -i -X GET \
       -H "Authorization:Bearer <TOKEN>" \
     'https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&projection=(elements*(organizationalTarget~(localizedName,vanityName,logoV2)))'
    

    Hope this help