Facebook Pixel
APILinkedIn Actions

Follow or unfollow a LinkedIn profile

Follow or unfollow a LinkedIn member to see their posts in your feed. Following does not require a connection. Provide either profileId (public identifier) or profileUrn (internal URN). Following builds your network visibility without sending connection requests. Rate limit: 100 actions per day.

POST/follow
Authentication requiredActions

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/follow' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"accountId":"acc_12345","profileId":"hasam-ud-din","action":"follow"}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
profileIdstringConditionalLinkedIn profile public ID (e.g., "john-doe-123") Either profileId or profileUrn must be provided.
profileUrnstringConditionalLinkedIn profile URN (e.g., "urn:li:fsd_profile:ABC123") Either profileUrn or profileId must be provided.
actionstringNoAction to perform: follow or unfollow the profile

Example

{
  "accountId": "acc_12345",
  "profileId": "hasam-ud-din",
  "profileUrn": "urn:li:fsd_profile:ACoAABcdefgh",
  "action": "follow"
}

Responses

StatusDescription
200Follow action completed successfully
400Bad request - Missing required fields
401Unauthorized - Invalid or missing API key
404Profile not found
429Rate limit exceeded

Rate Limit Headers

All responses include rate limit information in the headers:

HeaderDescription
X-RateLimit-ActionThe action type being rate limited
X-RateLimit-LimitMaximum actions allowed per period
X-RateLimit-UsedActions used in current period
X-RateLimit-RemainingActions remaining
X-RateLimit-ResetISO 8601 timestamp when limit resets

200 Response Parameters

NameTypeDescription
successboolean
actionstring
profileUrnstringLinkedIn profile URN of the followed/unfollowed user
messagestring

200 Example

{
  "success": true,
  "action": "follow",
  "profileUrn": "urn:li:fsd_profile:ACoAAA24A-MBVEvT49xpVF2gnWrhvmUIPDJshSM",
  "message": "Successfully followed user"
}

400 Response Parameters

NameTypeDescription
errorstring

400 Example

{
  "error": "Either profileId or profileUrn must be provided",
  "success": false
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "Unauthorized"
}

404 Response Parameters

NameTypeDescription
errorstring

404 Example

{
  "error": "LinkedIn profile not found: invalid-profile-id",
  "success": false
}

429 Response Parameters

NameTypeDescription
errorstring
successboolean

429 Example

{
  "error": "Rate limit exceeded for FOLLOW: 100/100 used. Resets at 2024-01-16T00:00:00.000Z",
  "success": false
}