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.
/followCode 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
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
profileId | string | Conditional | LinkedIn profile public ID (e.g., "john-doe-123") Either profileId or profileUrn must be provided. |
profileUrn | string | Conditional | LinkedIn profile URN (e.g., "urn:li:fsd_profile:ABC123") Either profileUrn or profileId must be provided. |
action | string | No | Action to perform: follow or unfollow the profile |
Example
{
"accountId": "acc_12345",
"profileId": "hasam-ud-din",
"profileUrn": "urn:li:fsd_profile:ACoAABcdefgh",
"action": "follow"
}Responses
| Status | Description |
|---|---|
| 200 | Follow action completed successfully |
| 400 | Bad request - Missing required fields |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Profile not found |
| 429 | Rate limit exceeded |
Rate Limit Headers
All responses include rate limit information in the headers:
| Header | Description |
|---|---|
X-RateLimit-Action | The action type being rate limited |
X-RateLimit-Limit | Maximum actions allowed per period |
X-RateLimit-Used | Actions used in current period |
X-RateLimit-Remaining | Actions remaining |
X-RateLimit-Reset | ISO 8601 timestamp when limit resets |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
action | string | |
profileUrn | string | LinkedIn profile URN of the followed/unfollowed user |
message | string |
200 Example
{
"success": true,
"action": "follow",
"profileUrn": "urn:li:fsd_profile:ACoAAA24A-MBVEvT49xpVF2gnWrhvmUIPDJshSM",
"message": "Successfully followed user"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "Either profileId or profileUrn must be provided",
"success": false
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "LinkedIn profile not found: invalid-profile-id",
"success": false
}429 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string | |
success | boolean |
429 Example
{
"error": "Rate limit exceeded for FOLLOW: 100/100 used. Resets at 2024-01-16T00:00:00.000Z",
"success": false
}LinkedIn Actions API
Programmatic follow, messaging, and connection workflows for LinkedIn.
Send a LinkedIn message
Send a direct message to a LinkedIn member. Supports regular messages (requires 1st-degree connection) and InMail (for non-connections, requires Premium). Can also send messages in group context. Either recipientProfileId or recipientProfileUrn must be provided. Rate limit: 100 messages per day per LinkedIn account.
