Question

Using LinkedIn Groups API, I am showing a list of groups the user is a member of on LinkedIn. Getting the list of groups in a single call is clear using

https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name),membership-state)?count=50&start=0&oauth2_access_token=' . $accessKey;

Task

Now, I want to show the group logo image alongside the group name. However, this would mean for n groups, I have to do n more API calls, and this slows down the page load (e.g. for 50 groups).

The documentation states,

You can access details about one or more groups such as the ID, name, settings, and posts from any groups resource path.

https://api.linkedin.com/v1/groups/{group-id}:(id,name,short-description,description,relation-to-viewer:(membership-state,available-actions),posts,counts-by-category,is-open-to-non-members,category,website-url,locale,location:(country,postal-code),allow-member-invites,site-group-url,small-logo-url,large-logo-url)

I want to get the logo images of the mentioned group ids in a single API call.

What I have tried

  • A comma-separated-value for {group-id}, but it gives error

    Invalid value {xxx1,xxx2,xxx3} in key {id}

  • A / separated value for {group-id} gives error

    Unknown field {xxx2} in resource {Group}

Kindly guide what I am missing here, as the documentation also suggests one or more groups and it is a genuine use-case.

Was it helpful?

Solution

https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name),…

You should be able to ask for all additional group fields you want directly in this call, by extending the field list after group:(… accordingly:

https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name,
small-lo‌​go-url,large-logo-url),…
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top