Facebook Pixel
APILinkedIn User

Get connections list

Retrieves the list of LinkedIn connections for the authenticated user. Returns connection details including name, headline, vanity name, and connected date. Supports pagination via startIndex and limit parameters.

GET/connections
Authentication requiredUser

Code Examples

curl -X GET 'https://api.connectsafely.ai/linkedin/connections' \
-H 'Authorization: Bearer <your_api_key>'

Parameters

NameInRequiredTypeDescription
accountIdqueryNostringLinkedIn account ID to use. If not provided, uses the default account.
startIndexqueryNonumberStarting index for pagination (0-indexed). Use to fetch additional connections.
limitqueryNonumberNumber of connections to return (max 12).
sortByqueryNostringSort order for connections. Options: recentlyAdded (default), firstName, lastName.

Request Body

No request body.

Responses

StatusDescription
200Connections list retrieved successfully
401Unauthorized - invalid or missing authentication
500Server error while fetching connections

200 Response Parameters

NameTypeDescription
successboolean
connectionsarray
startIndexnumberStarting index used for this request
limitnumberNumber of items requested
sortBystringSort order applied to connections
accountIdstringLinkedIn account ID used for the request

200 Example

{
  "success": true,
  "connections": [
    {
      "firstName": "John",
      "lastName": "Doe",
      "vanityName": "johndoe",
      "headline": "CEO | Entrepreneur | Tech Founder",
      "connectedDate": "Connected on Feb 15, 2024",
      "profileUrl": "https://www.linkedin.com/in/johndoe/"
    },
    {
      "firstName": "Jane",
      "lastName": "Smith",
      "vanityName": "janesmith",
      "headline": "VP of Engineering at TechCorp",
      "connectedDate": "Connected on Jan 10, 2024",
      "profileUrl": "https://www.linkedin.com/in/janesmith/"
    }
  ],
  "startIndex": 0,
  "limit": 10,
  "sortBy": "recentlyAdded",
  "accountId": "696ce9e780e0483585e4e553"
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "example_value"
}

500 Response Parameters

NameTypeDescription
errorstring

500 Example

{
  "error": "example_value"
}