JavaScript SDK: swarmhit.accounts.reconnect(accountId, params?)
Reconnect a sender whose LinkedIn session broke. status is reconnected, checkpoint_required or failed. In every case the sender keeps its id, its campaigns and its seat.
For a credentials / infinite-login sender this retries the saved sign-in and runs one attempt now. If its saved provider account no longer exists, a replacement is created from the stored credentials and attached to the same sender. If the person changed their password (or 2FA), pass a new password (and totpSecret) to replace the stored credentials first. Any credential field (totpSecret, username, country, proxy) needs password alongside it (400 otherwise). An omitted totpSecret or proxy keeps the stored one, but country is replaced, so send it again if the sender has one. Seats are not checked here: a sender reconnected beyond the plan's seats is parked again within minutes.
For a cookie sender, omit liAt to sign in again with its saved browser session, or pass a fresh liAt (and ideally the userAgent it came from) to replace it. A liAt from a different LinkedIn account, or one LinkedIn asks to verify, is refused with status failed.
A legacy sender with no stored credentials at all can be repaired by passing username + password, which converts it into a credentials / infinite-login sender from then on. The alternative for any sender is a hosted connect link scoped to it (POST /accounts/hosted-link with accountId), which lets the person sign in themselves.
A stored authenticator secret clears a 2FA challenge on its own. Any other challenge comes back as checkpoint_required with the checkpoint to answer on POST /accounts/{id}/checkpoint.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Optional. New credentials when the person changed their LinkedIn password or 2FA, or a fresh browser session for a cookie sender. Omit entirely to retry the saved sign-in.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/accounts/string/reconnect" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "string", "label": "string", "senderId": "string", "fullName": "string", "firstName": "string", "lastName": "string", "headline": "string", "publicIdentifier": "string", "profileUrl": "string", "profilePicture": "string", "connectionMethod": "cookie", "connectedVia": "app", "hostedLinkId": "string", "status": "active", "connectionStatus": "string", "isVerified": true, "isPremium": true, "linkedinPlan": "classic", "error": "string", "limits": {}, "usage": {}, "paused": true, "pausedReason": "user", "pausedAt": "2019-08-24T14:15:22Z", "cooldownUntil": "2019-08-24T14:15:22Z", "cooldownReason": "invite_daily_limit", "checkpoint": { "type": "2FA", "input": "code", "requestedAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "expired": true, "canResend": true, "canTryAnotherWay": true, "liveView": true }, "inmailCredits": { "balance": 0, "syncedAt": "2019-08-24T14:15:22Z" }, "ssi": { "score": 0, "brand": 0, "people": 0, "insights": 0, "relationships": 0, "industryTop": 0, "networkTop": 0, "industryAverage": 0, "networkAverage": 0, "industryName": "string", "unavailable": true, "syncedAt": "2019-08-24T14:15:22Z" }, "country": "string", "stoppedReason": "proxy_drift", "connection": { "country": "string", "isp": "string", "changedAt": "2019-08-24T14:15:22Z" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "status": "reconnected", "checkpointType": "string", "checkpoint": { "type": "2FA", "input": "code", "requestedAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "expired": true, "canResend": true, "canTryAnotherWay": true, "liveView": true }, "error": "string"}Move a stopped sender onto a new IP POST
**JavaScript SDK:** [`swarmhit.accounts.pickNewIp(accountId)`](/smart-api/sdk/methods#accounts) For a sender on a managed connection that was stopped because the connection left its country or internet provider, or went down (`stoppedReason` `proxy_drift` / `proxy_down`): moves it now to a fresh connection in its own country, instead of waiting for the automatic retry. 409 `not_supported` when the sender has no managed connection (its own proxy); 503 `no_ip_available` when none is free in its country right now (try again in a few minutes).
Rename an account or set its sender PATCH
**JavaScript SDK:** [`swarmhit.accounts.update(accountId, params)`](/smart-api/sdk/methods#accounts) Sets the account's `label` (`null` or an empty string clears it) and its `senderId` (`null` unlinks it), whichever are given. A sender has one LinkedIn account at most: a sender that already has another is refused with `400`, `code: sender-has-linkedin`.