APILinkedIn Groups
Get group members (legacy endpoint)
Legacy endpoint to retrieve members of a LinkedIn group. Supports multiple input formats: group URL, group URN, or group ID. Returns member profiles with filtering options for membership status and search. Consider using /groups/members or /groups/members-by-url for newer implementations.
POST
/group-membersAuthentication requiredGroups
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/group-members' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","groupUrl":"https://linkedin.com/groups/12345678","groupId":"12345678","count":10,"start":0,"membershipStatuses":["OWNER","MANAGER","MEMBER"],"typeaheadQuery":""}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
groupUrl | string | No | Full LinkedIn group URL (e.g., "https://www.linkedin.com/groups/12345") |
groupUrn | string | Conditional | LinkedIn group URN (e.g., "urn:li:fsd_group:12345") Either groupUrn or groupId must be provided. |
groupId | string | Conditional | LinkedIn group ID (numeric ID from group URL) Either groupId or groupUrn must be provided. |
count | number | No | Number of members to return per page |
start | number | No | Pagination offset (0-indexed) |
membershipStatuses | array | No | Filter by membership status: OWNER (group owners), MANAGER (group admins), MEMBER (regular members) |
typeaheadQuery | string | No | Search query to filter members by name |
Example
{
"accountId": "acc_12345",
"groupUrl": "https://linkedin.com/groups/12345678",
"groupUrn": "urn:li:example:123456",
"groupId": "12345678",
"count": 10,
"start": 0,
"membershipStatuses": [
"active"
],
"typeaheadQuery": ""
}Responses
| Status | Description |
|---|---|
| 200 | Group members retrieved successfully |
| 400 | Invalid request - missing group identifier or invalid format |
| 403 | Access forbidden - group may be private or user lacks permissions |
| 404 | Group not found or no active LinkedIn account |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
groupId | string | The group ID that was queried |
accountId | string | LinkedIn account ID used for the request |
members | array | |
pagination | object | |
filters | object | |
message | string |
200 Example
{
"success": true,
"groupId": "12345678",
"accountId": "acc_12345",
"members": [
{
"profileId": "john-doe-123",
"name": "example_value",
"headline": "example_value",
"profileUrl": "https://linkedin.com/in/example",
"profilePicture": "example_value",
"membershipStatus": "active"
}
],
"pagination": {},
"filters": {},
"message": "Hello! I would like to connect with you."
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "example_value"
}403 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
403 Example
{
"error": "example_value"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "example_value"
}Get group members by group URL
Retrieve members of a LinkedIn group using the group URL. Automatically extracts the group ID from the URL. Convenient alternative to /groups/members when you have the full URL instead of just the ID. Rate limit: 1000 members per day per LinkedIn account.
LinkedIn Messaging API
Send LinkedIn messages via API, retrieve conversations, and build automated outreach sequences.
