Monitoring linkedin account health via api
Track linkedin account status and restrictions using apis to monitor a team of accounts without manual checks and prevent total account loss.
Get startedShort answer
You can track linkedin account status by using an api that monitors account restrictions and outreach pauses. Since linkedin does not provide a public api for account health, you must use a third party provider that connects via oauth or api keys to monitor connectivity and activity logs.
Why you can't use the official linkedin api
The official linkedin marketing api is for publishing content and managing ads. It doesn't have endpoints that tell you if an account is restricted, flagged, or in a temporary lockout. If you are managing a team of SDRs, relying on the official api for health checks is a mistake because it only reports on the success of a specific request, not the state of the account.
If an account is restricted, the official api just stops returning data or gives a generic error. It won't tell you why the account is down or how to fix it. You can't programmatically check if a user is in linkedin jail with native tools because linkedin does not want third party software to easily detect when their security filters have triggered.
To track health, you need a system that monitors the actual connection state between the account and the platform. This requires a third party bridge to detect when a session expires or when the platform pushes back on an action. This bridge acts as a proxy that can interpret the difference between a network timeout and a platform restriction.
When you manage multiple accounts, the risk is that one account gets flagged and you don't notice for days. By then, the account might be permanently banned. A monitoring loop allows you to catch the first sign of a restriction, such as a failed connection request, and pause all activity before the platform takes more drastic action.
Official api approach
- Checking the marketing api for account status
- Waiting for a 401 error to realize an account is restricted
- Assuming a lack of data means the account is healthy
Connection monitoring approach
- Using a bridge api to check connection state
- Monitoring session validity in real time
- Tracking action-level pushbacks to predict restrictions
How to set up an account monitoring loop
Tracking account status requires a loop that checks the connection state at regular intervals. You can't rely on a single check because linkedin session tokens can expire or be revoked instantly. If you only check once a day, you might miss a 24 hour temporary restriction that could have been avoided by pausing your outreach scripts.
Start by connecting the account to a provider that uses a secure bridge, such as unipile. This lets you query the status of the connection without logging in manually every time. This is the only way to maintain a programmatic check without triggering more security alerts by constantly attempting to log in via a browser automation tool.
Once connected, use a script or a chat client to poll the api. If the status changes from active to an error state, you can trigger an alert to your team. This allows your SDRs to stop sending messages immediately, which is the most important step in saving an account that has been flagged for unusual activity.
The loop should be designed to handle different types of failures. A session expiration is a common event that just requires a re-login. A restriction, however, is a platform-level event that requires you to stop all activity and possibly submit an ID for verification. Your monitoring logic must distinguish between these two states to avoid unnecessary panic.
- 1
Connect the account
Link your linkedin account to a provider that supports api access via oauth or a secure bridge to avoid manual login prompts.
- 2
Configure the polling script
Set up a script or an mcp client like claude to request the current connection status of the account every hour.
- 3
Define the alert trigger
Create a logic gate that sends an email or slack notification if the api returns a status other than active or connected.
- 4
Log the history
Save every status change to a database to identify patterns in how often specific accounts are paused or flagged.
- 5
Implement an auto-pause
If the api returns a pushback error, have your script automatically disable the outreach queue for that specific account.
Building the monitoring script
A basic monitoring script uses a get request to the account status endpoint. Put your api key in the header to authenticate the request. You don't need complex infrastructure for this; a simple python script running on a cron job or a cloud function is enough to keep a team of accounts healthy.
The response is a json object. Look for fields that show the connection state or whether the system has paused the account. You should specifically look for error codes that indicate a restriction rather than a simple timeout. A timeout might be a temporary network glitch, but a restriction code is a direct signal from the platform.
Logging these responses shows if an account is being pushed back frequently. Frequent pushbacks are usually a leading indicator that a full restriction is coming. If an account is paused three times in one week, it is a sign that the volume of invites or the content of the messages is triggering security filters.
When writing the script, ensure you include a retry mechanism. If the api fails once, don't trigger a high-priority alert. Wait five minutes and try again. This prevents your team from being flooded with false positives caused by temporary api downtime or network instability.
Paste this job
GET /accounts/{account_id}/status
Host: api.provider.com
Authorization: Bearer YOUR_API_KEY
Response:
{
"account_id": "12345",
"status": "paused",
"reason": "linkedin_pushback",
"last_checked": "2023-10-27T10:00:00Z"
}Managing a team of accounts
Manual checking is impossible when you manage ten or more accounts. You need a centralized dashboard that lists every connected account and its current state. Without this, you are essentially guessing if your outreach is working or if your accounts are silently dying in the background.
A heartbeat check every hour is usually enough. This verifies the connection is live and the session hasn't been killed by linkedin. If you are running high volume campaigns, you might increase this to every thirty minutes, but any more frequent than that is unnecessary and may hit provider rate limits.
Group accounts by the person managing them to find the root cause of restrictions. If one person's accounts are always the ones being paused, it's likely a behavior issue rather than a technical one. They might be sending too many requests or using a script that doesn't mimic human timing.
You should also track the acceptance rate of connection requests. A sudden drop in acceptance rates often precedes a restriction. When people mark your requests as 'I don't know this person', linkedin's system flags the account. Monitoring this metric via api allows you to pivot your targeting before the account is locked.
Connection state
- Metric
- Verify account is linked
- Purpose
- Status returns error or disconnected
Action status
- Metric
- Check if invites are sending
- Purpose
- Status returns paused or pushed back
Heartbeat frequency
- Metric
- Ensure monitoring is active
- Purpose
- No api response for over 2 hours
Acceptance rate
- Metric
- Measure lead quality
- Purpose
- Rate drops below 20 percent
Handling restrictions when they happen
When your api alert triggers, the first action must be to stop all automated activity. Continuing to send requests to a restricted account is the fastest way to turn a temporary 24 hour ban into a permanent account termination. Turn off all scripts and disconnect the api bridge temporarily.
Check the account manually by logging in through a browser. If you see a prompt to upload a government ID, do it immediately. This is the standard way to lift a restriction. Do not try to bypass this by creating a new account on the same browser or ip address, as this often leads to a chain of bans.
Analyze the logs from your monitoring script to see what happened right before the restriction. Did the account send 50 invites in one hour? Did it send the exact same message to 100 people? Identifying the trigger allows you to adjust your sales playbook and timing to prevent the same thing from happening to the rest of your team.
Once the restriction is lifted, do not immediately resume full volume. Start with a warm-up period. Send a few manual messages and connection requests over several days. Use your monitoring api to ensure the account stays in an active state before you gradually scale back up to your normal volume.
Example
- You
Hi Sarah, I saw your post about B2B scaling. Would love to connect.
- Prospect
Thanks! Happy to connect. What do you do?
- Suggested reply
I help founders automate their lead gen so they can focus on closing. I'm actually using a tool to monitor my account health right now so I don't get banned while doing this.
Doing this with kinlead
Kinlead handles account monitoring using a rest agent api and an mcp server. This lets you use tools like claude, chatgpt, or cursor to check your replies and account status without building your own dashboard from scratch.
The system monitors for linkedin pushbacks automatically. If the platform pushes back on an account, kinlead pauses invites on that account and emails you immediately so you can take action before a full restriction occurs.
You can monitor account health in settings to see pending invitations and acceptance rate. The system provides warnings when these metrics suggest your account is at risk, which helps you adjust your targeting or messaging strategy.
Outreach runs from your own account connected through unipile, and the system sends at a human pace. Each account sends at most one action every 5 minutes, which reduces the likelihood of triggering the restrictions your monitoring script is designed to catch.
Kinlead connects through unipile and never stores your linkedin password.
Frequently asked questions
Related
Get started with Kinlead
Prefer markdown? Monitoring linkedin account health via api.md