Linkedin v2 api: Not enough permissions to access:

2019-04-15 17:15发布

问题:

While fetching organization follower statistics using LinkedIn v2 API I used country projection to get country, region, industries, functions details also. But it throws error for countries alone, other details are included as expected.

URN Resolution failed for unknown reasons.: com.linkedin.restligateway.exceptions.GatewayAccessException: Not enough permissions to access: GET /countriesV2

My query is

curl "https://api.linkedin.com/v2/organizationalEntityFollowerStatistics?q=organizationalEntity&organizationalEntity=urn:li:organization:12345&projection=(elements*(*,followerCountsByRegion*(*,region~($URN)),followerCountsByCountry*(*,country~($URN)),followerCountsBySeniority*(*,seniority~($URN)),followerCountsByIndustry*(*,industry~($URN)),followerCountsByFunction*(*,function~($URN))))&oauth2_access_token=XXX"

Response

{elements[... [{ "country" : "urn:li:country:cn", "followerCounts" : { "organicFollowerCount" : 1, "paidFollowerCount" : 0 }, "country!" : { "message" : "URN Resolution failed for unknown reasons.: com.linkedin.restligateway.exceptions.GatewayAccessException: Not enough permissions to access: GET /countriesV2", "status" : 500 } } ], "organizationalEntity" : "urn:li:organization:12345" } ] }

But when i query countries endpoint directly it returns expected result. Can anyone help me resolve this.