GroundsocialDocs

API · LinkedIn

POST /linkedin/accounts

Connect your own LinkedIn session

RequestPOST /v1/linkedin/accounts
Operation idlinkedin.accounts.connect
CostFree
AuthAPI key: Authorization: Bearer <key> or x-api-key.

Checks the session with LinkedIn and stores it only if it works. A session that needs a security check, is restricted or logged out is refused with a 422-style invalid_request and nothing is stored.

Request body

FieldTypeRequiredDescription
li_atstringyesThe value of the li_at cookie of a session you logged into yourself.
jsessionidstringyesThe JSESSIONID cookie of the same session (ajax:…).
user_agentstringyesThe user agent of the browser that session lives in.
li_astringnoOptional: the li_a cookie LinkedIn sets once you open Sales Navigator in that browser. Needed for the Sales Navigator endpoints.
proxystringnoOptional: your own proxy (ideally a static IP in your country) for every request on this account. Without one we pin the account to one sticky residential exit.
countrystringnoOptional: ISO country of the account, for the exit we pin.
labelstringnoYour name for this session, up to 60 characters.

Responses

StatusMeaningSchema
201Connected.ConnectedSession
400Invalid input.Error
401Missing or invalid credentials.Error
404No connected LinkedIn session with that id among yours.Error
409Already 10 connected LinkedIn sessions on this account.Error
422LinkedIn did not accept the session. Nothing was stored.Error
429Too many connect attempts. Wait for Retry-After seconds.Error
503LinkedIn could not be reached. Retryable; nothing was stored.Error

ConnectedSession fields

FieldTypeDescription
idstring
platformstring
labelstring | null
status"ok" | "checkpoint" | "restricted" | "logged_out"ok: usable. checkpoint, restricted, logged_out: the network needs you, in your own browser; calls on it stop until you reconnect.
status_detailstring | null
profileobjectNon-secret facts about the account (name, public id).
created_atstring
last_checked_atstring | null
last_used_atstring | null
quotasobject[]

Errors use one shape everywhere; see Errors for every code and what to do.