Connect accounts
Add your customers' LinkedIn accounts as senders, with a hosted page or your own flow.
A sender is one LinkedIn account connected to a workspace. Each sender gets its own proxy in its owner's country (never a shared IP, never another country), and Tryzen paces everything it does. Your customer connects their own account; Tryzen never asks for a LinkedIn password.
There are two ways to connect one (plus a streamed sign-in inside either). Both need a key with senders: manage.
Option 1: the hosted connect page (recommended)
Create a link and send your customer to it. Tryzen's page does the rest: it offers the Tryzen browser extension (one click, no code to paste) or a cookie paste, asks the customer to confirm it's their profile, lets them choose the inbox mode, then redirects back to you.
curl -s -X POST "$TRYZEN_API/v1/senders/connect-links" \
-H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
-d '{
"proxyCountry": "IN",
"label": "Asha (sales)",
"externalId": "customer-7",
"successRedirectUrl": "https://app.example.com/linkedin/connected",
"failureRedirectUrl": "https://app.example.com/linkedin/failed"
}'{ "linkId": "…", "url": "https://…/connect/nrl_…", "expiresAt": "…" }- When it works, the page redirects to
successRedirectUrl?senderId=…&linkId=…&externalId=…. - When it doesn't, to
failureRedirectUrl?code=…&linkId=…&externalId=…, wherecodeis the connect failure (see below),pin_required,link_expiredorcancelled. - Redirect URLs must be
https. They are the only places the page ever sends your customer. urlcontains the link's secret and is shown once. The link expires afterexpiresInMinutes(default 60, at most 1440) and is used up once its sender is connected.- Add
senderIdto reconnect an existing sender instead of adding a new one. It keeps itssenderId, andproxyCountryandlabelmay be left out (the sender keeps its proxy). - With white-label on, the page is served on your brand's host and shows your brand.
The sender_status_changed webhook for a sender connected through a link carries
connectLink: { id, externalId }, so you know which of your customers just came online.
Option 2: your own connect flow
Use this when you want the connect UI inside your product.
Start the connect
With cookies your customer copied from their own browser:
curl -s -X POST "$TRYZEN_API/v1/senders/connects" \
-H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
-d '{
"method": "cookies",
"proxyCountry": "IN",
"label": "Asha (sales)",
"liAt": "<li_at cookie>",
"jsessionId": "ajax:<digits>",
"userAgent": "<their browser user agent>"
}'For an account with Sales Navigator, add its li_a cookie as "liA" (optional; it is used only
for Sales Navigator requests). If you hold the browser's whole cookie jar, also send its
bcookie and bscookie exactly as the browser holds them, quotes included (optional): with
them, Tryzen is that browser rather than a second device signed in to the same account.
Or with the Tryzen extension (it sends all of these itself): { "method": "extension", "proxyCountry": "IN" }. The answer's
connect.connectToken (shown once, valid until connectTokenExpiresAt) is what your customer
pastes into the extension in their own Chrome; the extension then sends the session.
Add senderId to reconnect an existing sender. If there is no free proxy in that country you get
422 no_proxy_in_country, or bring your own (below).
Poll the connect
GET /v1/senders/connects/{connectId} until connect.phase moves on. When it is
confirm_profile, show connect.profile (name, headline, public id, avatar) to your customer.
When it is check_required, LinkedIn showed a check when we read the session: your customer
opens LinkedIn in their own browser, finishes it, then you call
POST /v1/senders/connects/{connectId}/retry-check. The attempt waits 15 minutes for it.
Confirm it's their account
curl -s -X POST "$TRYZEN_API/v1/senders/connects/$CONNECT_ID/confirm" \
-H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" -d '{"isMe": true}'If LinkedIn asks for a PIN (pin_required), collect it from your customer and send it with
POST /v1/senders/{senderId}/pin.
Choose the inbox mode
At phase choose_inbox:
curl -s -X POST "$TRYZEN_API/v1/senders/connects/$CONNECT_ID/inbox-mode" \
-H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" -d '{"inboxMode": "full"}'Done
Phase done: the sender is available. Phase failed: connect.error has a code and a plain
sentence to show.
Email and password (streamed sign-in)
For customers who won't copy cookies or install the extension. Tryzen opens a browser on its server through the sender's own proxy and streams its screen to your page. Your customer types their email, password and any PIN or code on the real LinkedIn page; Tryzen never sees or stores the password, only the resulting session. The hosted connect page has this as its Sign in tab; the calls below are for your own UI.
Start
curl -s -X POST "$TRYZEN_API/v1/senders/connects" \
-H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
-d '{ "method": "sign_in", "proxyCountry": "IN", "label": "Asha (sales)" }'Add senderId to reconnect (proxyCountry stays required). The answer's connect.id names the
sign-in (the connectId below).
Read frames
GET /v1/senders/connects/{connectId}/sign-in/frame?after={seq} waits up to 10 seconds for a newer
frame: { seq, state, screen, frame, width, height, endsAt, endReason }, where frame is a
base64 JPEG of the visible page at width×height pixels (at most 1280×800). Click coordinates
are in those frame pixels; the server maps them to the page. Until the browser is up the call answers 404 sign_in_not_found:
retry for up to about a minute. screen says what LinkedIn shows (login, pin, authenticator,
app_approval, …).
Send input
curl -s -X POST "$TRYZEN_API/v1/senders/connects/$CONNECT_ID/sign-in/input" \
-H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
-d '{ "events": [ { "type": "text", "value": "asha@example.com" }, { "type": "key", "name": "Tab" } ] }'Up to 20 events per call and 10 calls per second (429 rate_limited). One caller at a time
controls a sign-in (60 seconds after its last input); another caller gets
409 sign_in_not_controller but can keep watching frames.
LinkedIn's press-and-hold check needs the customer's own press: send pointer events as they
happen ({ "type": "pointer", "phase": "down", "x": 640, "y": 400, "gapMs": 0 }, then moves
and an up, each gapMs after the previous one, at most 1000). A hold lasts as long as theirs.
Finish
When state is handed_over the session is ours. POST …/sign-in/finish returns the same
(409 not_signed_in while the customer is still typing, idempotent afterwards). Then continue
with GET /v1/senders/connects/{connectId} as in Option 2: confirm the profile, choose the inbox
mode.
Cancel
POST …/sign-in/cancel ends it (nothing happens once the session was handed over).
A sign-in lasts 10 minutes (it ends after 2 minutes without a frame poll). A workspace can run 2 at once (409 sign_in_limit).
503 sign_in_unavailable means streaming is off on this deployment. If LinkedIn shows one of its own
checks (a captcha, "quick security check", press-and-hold), the frame's screen is check and the
customer completes it on the stream; Tryzen never solves one. A restriction, a limit or an
ID-document check ends the sign-in with needs_extension, and the customer uses the extension. The hosted link has the same calls under
/v1/connect-links/{secret}/sign-in/*.
Your own proxy
A new sender normally takes a free proxy of your workspace's pool in proxyCountry. To use a
proxy you bought, add proxy to the connect body or to the connect-link body:
{
"method": "sign_in",
"proxyCountry": "AE",
"proxy": {
"protocol": "http",
"host": "ae1.proxy.example.com",
"port": 31280,
"username": "<user>",
"password": "<password>"
}
}Tryzen checks it through the proxy itself before anything is created. Its exit IP must be in
proxyCountry; there is no fallback to the pool or to another country. A failed check is 422
with its code (unreachable, auth_failed, timeout, echo_failed, country_mismatch), and a
proxy another sender already uses is 409 proxy_in_use. The password is encrypted at once and
never returned. If the connect can't start after the check (503), nothing is kept, so you can
retry the same call. proxy is for new senders only: change an existing sender's proxy with
PUT /v1/senders/{senderId}/proxy.
For a connect link, the check runs when you create the link and the proxy is reserved for it. If your customer opens the link more than 10 minutes later, the proxy is checked again before the connect starts. A link that expires unused releases the proxy.
India (IN), the UAE (AE) and Saudi Arabia (SA) work like any other country.
Inbox mode: choose full for integrations
full: the workspace (and so your integration) can read the account's messages.private: the mailbox belongs to its owner alone. Message webhooks then withhold the text (message.contentWithheld: true) and the conversations stay out of your key's reach.
An integration that reads or answers replies needs full.
Connect failures
code | What happened | What to do |
|---|---|---|
auth_lost | The session isn't valid (logged out, cookies expired) | Ask for fresh cookies or use the extension again |
challenge | LinkedIn's check stayed up: no retry-check within 15 minutes, or five checks in a row | They finish LinkedIn's check in their own browser first. Don't start again until they have |
not_me, wrong_account | The customer said it isn't their profile, or it's a different account than the sender | Start again with the right account |
already_connected | The account is already a sender | Use the existing sender |
confirm_timeout, extension_timeout | Nobody confirmed, or the extension never sent the session | Start again |
needs_extension | Streamed sign-in hit a restriction, a limit or an ID-document check | Use the extension or cookies |
sign_in_expired, sign_in_interrupted, sign_in_cancelled | The sign-in timed out, the browser stopped, or it was cancelled | Start again |
driver_unavailable, proxy_missing | No browser or proxy available right now | Try again later |
throttled, network_error, proxy_error, linkedin_error | A temporary problem | Try again later |
Branch on code. The message is a sentence for your customer and fits how they connected (a
sign-in's never mentions cookies); its wording may improve.
A first connect that fails leaves its sender not_connected with holdsSeat: false. Such a
sender holds no seat and no proxy, so failed attempts never use up your seats. Retry it with
the same senderId (or the same hosted link): that connect takes a seat and a proxy again, and
your key may do it. Remove it in the app if you won't retry.
Keep an eye on senders
Subscribe to the sender_status_changed webhook. It fires when a connect or
reconnect ends (available, or the status a failure leaves) and whenever a sender's status
moves later, for example to cooldown, or not_connected with a reason such as auth_lost or
disconnected_by_user. When a sender stops, pause that customer's outreach on your side and send
them a connect link with that senderId to reconnect it.
Your key can reconnect a sender that still holds its seat (auth_lost, challenge, …). A
sender that was disconnected in Tryzen, or whose seat is inactive, holds no seat: a key, or a
link a key created, gets 409 seat_requires_person, and a person reconnects it in the Tryzen
app. Reconnecting from a stored session is for people only.
Disconnecting or removing a sender
When your customer disconnects their LinkedIn account in your app, call
POST /v1/senders/{senderId}/disconnect. It stops the sender, deletes its stored LinkedIn session
and frees its seat; the sender stays, so its history and conversations remain readable and it can
be reconnected later. Your key needs the Disconnect senders permission for this: it is off
unless someone ticks it when the key is made (with Senders: Manage). Any other key gets
403 api_key_not_allowed, by design: a leaked ordinary key must not be able to take every sender
offline. Tick it only on the key that has to disconnect.
Removing a sender for good (DELETE /v1/senders/{senderId}) is never done by an API key: every
key gets 403 api_key_not_allowed. An org admin removes it in the Tryzen app. If you want a
departed customer's sender gone, disconnect it by key, then ask an admin to remove it.