Connect LinkedIn with a cookie
const url = 'https://digize.com/api/v1/unipile/accounts/cookie';const options = { method: 'POST', headers: { 'Idempotency-Key': '5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69', 'x-api-key': '<x-api-key>', 'Content-Type': 'application/json' }, body: '{"accept":true,"liAt":"example","userAgent":"example","liA":"example","country":"example","reconnect":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://digize.com/api/v1/unipile/accounts/cookie \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \ --header 'x-api-key: <x-api-key>' \ --data '{ "accept": true, "liAt": "example", "userAgent": "example", "liA": "example", "country": "example", "reconnect": "example" }'Connects the member’s LinkedIn account with the li_at cookie from a browser signed in to LinkedIn and that browser’s user agent (and Sales Navigator’s li_a cookie, optionally). Unipile signs in with it; Digize doesn’t keep the cookie. Answers the account, or the check LinkedIn asks for next (answer it with unipile.accounts.checkpoint within 5 minutes).
Needs the outreach:write permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.
Example
5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69Request Bodyrequired
Section titled “Request Bodyrequired”object
The member accepts that automating LinkedIn breaks LinkedIn’s User Agreement and their account can be restricted. Kept with the account.
The li_at cookie’s value.
The user agent of the browser the cookie came from.
Sales Navigator’s or Recruiter’s li_a cookie.
Where Unipile’s proxy for the account should be, as an ISO country code. Best where the member is.
An account to sign in again, from unipile.accounts.list.
Responses
Section titled “Responses”Done
object
object
Unipile’s id for the account: account_id in integrations.unipile calls.
ok sends; credentials needs reconnecting; restricted LinkedIn restricted it; error, stopped Unipile stopped syncing it; deleted it’s gone from Unipile; connecting for a moment.
object
Working days, 0 for Sunday to 6 for Saturday.
Minutes after midnight on the account’s clock.
Minutes after midnight on the account’s clock.
object
Members who may run campaigns from it, by user id.
When the owner accepted that automating LinkedIn breaks its rules and the account can be restricted.
object
object
2FA or OTP (a code), IN_APP_VALIDATION (approve in LinkedIn’s app), PHONE_REGISTER (a phone number, as (+33)0612345678), CAPTCHA.
object
Example
{ "status": "connected", "account": { "provider": "LINKEDIN", "plan": "free", "status": "ok", "connectedVia": "hosted" }}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}A request with the same Idempotency-Key is still running (conflict).
object
object
object
Example
{ "error": { "code": "invalid" }}The Idempotency-Key was used with a different request.
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}