Skip to content
ProspectAPIs

Connected accounts

Connect a LinkedIn account
once, for free, in one call

A connected LinkedIn account is a LinkedIn account of your own, linked to your ProspectAPIs API key, so the actions you call run as you. Send the account's session string or sign in through the API; the session is stored encrypted, never returned, and deleted from our database the moment you disconnect. Connecting is free.

The numbers

Per our API reference and live price list: 4 routes, all free, 10 connect attempts a minute per account.

To connect
$0
Checking and disconnecting are free too.
Call to connect
1
A session string, checked live once.
To answer a sign-in challenge
15 min
Two-factor, emailed code or a check.
Times the session is returned
0
No route sends it back, even to you.

The four routes

All behind your API key, all free.

Connected account routes
RouteWhat it doesPrice
POST /v1/accounts/sessionConnect with the account's signed-in session string, checked live once.Free
POST /v1/accounts/loginConnect by signing in, with a code or a check when the account asks.Free
GET /v1/accounts/sessionWhat is connected and whether it is still signed in. Never the session.Free
DELETE /v1/accounts/sessionDisconnect and delete the stored session. Works at a zero balance.Free

Two ways to connect

  1. 1

    With a session string

    Sign in to your account in your own browser, copy its session string and send it once. We check it live, read the account's handle and name, and answer 201. A signed-out session answers 422 and nothing is stored.

  2. 2

    By signing in

    Send the account's email or phone and password. When the account asks for a two-factor code, an emailed code or a check a person must finish, the answer is a 409 with a challenge_id; send it back with the code within 15 minutes. The password is used for that sign-in only.

  3. 3

    Check, then act

    GET /v1/accounts/session shows whether the account is active. From there, every action on the LinkedIn automation API runs on it.

When the sign-in asks for more

Each step is a typed answer. Nothing here is billed.

Sign-in outcomes
Status and codeWhat it meansWhat to do
409 two_factor_requiredThe account asks for a two-factor code.Send the code with challenge_id
409 email_code_requiredThe account emailed a code.Send it with challenge_id, or open handoff_url
409 captcha_requiredA person must finish a check.Open handoff_url, then resend with challenge_id
410 challenge_expiredMore than 15 minutes passed.Start the sign-in again
422 bad_credentialsThe sign-in details were not accepted.Check them and retry
422 account_restrictedThe platform restricted the account.Only its holder can resolve it

What a connection lets you do

Every action on the LinkedIn automation API runs on the connected account: messages, invites, follows, visits, posts, reactions, comments and reposts, each at its own price. It also opens the followers read for a company page the account administers, on the LinkedIn data API. Our guide to researching prospects with an AI agent shows the research that comes before the first action.

Your first request

curl -X POST https://api.prospectapis.com/v1/accounts/session \
  -H "Authorization: Bearer $PROSPECTAPIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"session": "<your account session string>"}'

# 201
{ "connected": true, "status": "active", "account": { "handle": "jane-doe", "name": "Jane Doe" } }

Every field and code is in the connected accounts guide and the connect reference.

What is stored, and what is deleted

The session we store for a connected account is kept encrypted in our database, used only to perform the actions you request, never shown to another customer, and deleted from our database when you disconnect. We log each action (endpoint, time and result) for billing and abuse prevention, and do not store message content in our database. This is the wording of our terms.

  • Your consent, your scope. Connecting authorizes us to perform the actions you request on the account and nothing else.
  • Disconnect any time. DELETE /v1/accounts/session deletes the stored session, is safe to repeat and works even at a zero balance.
  • Its own connection. Every connected account acts through its own dedicated IP unless you bring your own proxy; while every dedicated IP is taken, a new account uses a shared IP until one frees up.
  • Paced per account. Every action is paced per account, and as our terms say, we may apply pacing and volume limits and may pause an account.

LinkedIn is a trademark of its owner. ProspectAPIs is an independent service and is not affiliated with, endorsed by or sponsored by LinkedIn. You are responsible for following its user agreement; see our terms and acceptable use policy.

Questions

Why connect a LinkedIn account?
Actions run as you: messages, invites, follows, visits, posts, reactions, comments and reposts all need an account to run on, and the followers of a company page are shown only to that page's administrators.
What do you store, and for how long?
The session of the account you connect, kept encrypted in our database, used only to perform the actions you request, never shown to another customer, and deleted from our database when you disconnect. We log each action (endpoint, time and result) for billing and abuse prevention and do not store message content.
Does it cost anything?
No. Connecting, checking and disconnecting are free. You pay only for the actions you run, each at its own published price.
What if my account asks for a two-factor code?
The sign-in answers 409 with a challenge_id. Send the same request again with the code and the challenge_id within 15 minutes. If the account asks a person to finish a check, the answer carries a handoff_url to open first.
What happens when the session signs out?
The status turns dead and actions answer session_logged_out. Connect again with a fresh session or a new sign-in; nothing else changes.
Do you keep my password?
No. When you connect by signing in, the password is used for that sign-in only. What we keep is the account's session, encrypted.
Is ProspectAPIs part of LinkedIn?
No. ProspectAPIs is an independent service and is not affiliated with, endorsed by or sponsored by LinkedIn. The platform may limit or restrict an account; our terms say what that means for you.
Can I connect an account I do not own?
Only one you are authorized to operate, and only where connecting it does not break an agreement you have with the platform. That is in our terms and acceptable use policy.

Connect free,
start with $1 of actions.