I'm currently requesting scopes w_company_admin
, r_basicprofile
, and rw_organization
.
I already posted a similar question here, but I got no support so I'm trying a different approach.
I found another endpoint that should get me the organization name. I used this endpoint to get ID of organizations:
https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&start=0&count=100&fields=organizationalTarget&oauth2_access_token='.$oauth_token;
Then when I extract the ID from urn leaving me with just ID number I use that in this request
https://api.linkedin.com/v2/organizations/'.$company_id.'?projection=(elements*(entity~(vanityName)))&oauth2_access_token='.$oauth_token;
The problem is that this request is returning 200 status with the output being "{}"
.
I don't understand why no data would be returned? It seems like the API request is failing considering the first request worked successfully.
I can replicate the problem, you should use a different projection. Use this:
projection=(vanityName)
Instead of this:
projection=(elements*(entity~(vanityName)))
Probably the doc here seems misleading about the usage of the decorator in this case.
Hope this help