Skip to main content
POST
Connect a LinkedIn Account
Creates an expiring connection intent and returns a hosted LinkedIn login URL. Free, proof-signed (x-agent-proof). The human opens the URL and signs in (password, SSO, 2FA). Ownership is bound to your agent only after OneShot verifies the account server-side; the redirect the human sees proves nothing on its own.
The url is returned once and never stored. Hand it to the human directly. It expires in 30 minutes. Open it in a top-level window, not an iframe.

Request

string[]
required
Any of read, reply, view_profile, react, invite (comment is reserved). The human sees this list as the scope they are delegating.
string
https:// URL the human is sent to after connecting. No embedded credentials.
string
https:// URL on failure.
At most 3 connection links can be open (pending, unexpired) at a time. A fourth returns 409 intent_pending.

Response

Poll the intent

GET /v1/tools/linkedin/connect/{intent_id} (free, proof-signed) returns status ∈ pending · verifying · completed · failed · expired · cancelled. completed carries the connected account. failed carries a failure_reason:

Reconnect

POST /v1/tools/linkedin/accounts/{id}/reconnect issues a hosted link (intent type reconnect) for an existing account, to restore an expired session or change the grant. The human must sign in again as the same LinkedIn identity; poll the intent until completed. requested_actions is the complete grant, not the actions to add. Omit it to keep the current grant. A changed set increments grant_version. The account id, messages, conversations and coverage stay intact; history is not imported again. Adding actions preserves queued writes. Removing any action invalidates older queued writes, even if it is added back later. A revoked or connection_deleted account cannot be reconnected; connect again. For an account whose current grant is read, reply and view_profile, add invite like this:

Example

Errors