Skip to main content

Connecting an Account

Connecting a LinkedIn account to We-Link is a precise process designed to ensure account safety and seamless automation. Because We-Link processes logins asynchronously to mimic human behavior and handle security checks, the process involves setting up a listener (webhook) before sending the login request.

Supported Account Types

You can connect and automate the following account types:

  • LinkedIn
  • Sales Navigator
  • Recruiter Lite
  • Recruiter Corporate

Prerequisites

Before attempting to log in, you must have your infrastructure ready:

1. Generate API Credentials

  • Log in to your We-Link Dashboard
  • Go to SettingsSecurityCreate API Key
  • Name your key, configure IP restrictions and allowed actions, then save
  • Copy your x-api-key and x-api-secret — they are only shown once

See Getting Your Credentials for a full walkthrough with screenshots.

2. Configure a Webhook

Since the login process happens asynchronously, We-Link sends the final status to a URL you provide:

  • Go to the Webhooks section of your dashboard
  • Create a new webhook endpoint (e.g., https://api.yoursite.com/webhook/welink)
  • Enable triggers for events

Set Up Two-Factor Authentication (2FA)

For the most stable and hands-free automation, we recommend using an Authenticator App (like Google Authenticator or Authy) rather than SMS.

  1. Log in to LinkedIn manually in your browser
  2. Navigate to Settings & PrivacySign in & securityTwo-step verification
  3. Choose Authenticator App as your verification method
  4. Copy the Secret Key displayed below the QR code — you'll send this to We-Link
  5. Complete the setup by scanning the QR code and entering the 6-digit verification code
Why Authenticator App?

Using the authenticator secret key allows We-Link to generate 2FA codes automatically in the background, ensuring completely hands-free operation.

For a detailed walkthrough with screenshots, see the 2FA Setup Guide.

Send the Login Request

Endpoint: POST https://api.we-link.ai/api/v1/login_v2

Headers:

HeaderValue
x-api-keyYour API key
x-api-secretYour API secret
Content-Typeapplication/json

We-Link assigns a high-quality, localized IP address:

{
"email": "user@example.com",
"password": "securePassword123",
"twoFASecret": "JBSWY3DPEHPK3PXP",
"proxy": {
"location": "US"
}
}

Using Customer Proxy

Provide your own proxy details:

{
"email": "user@example.com",
"password": "securePassword123",
"twoFASecret": "JBSWY3DPEHPK3PXP",
"proxy": {
"host": "192.168.1.1",
"port": 8080,
"username": "proxy_user",
"password": "proxy_password"
}
}
Proxy details

For a full explanation of proxy options, validation, billing, and best practices, see Proxy Configuration.

WARNING

We-Link persists the session once an account is successfully connected — you do not need to log in again unless the session expires or is explicitly disconnected. Logging in multiple times creates duplicate sessions, which can trigger LinkedIn's security systems to flag your account and may result in temporary or permanent restrictions.

Always check the account status before attempting a new login.

Handle the Response

The immediate response acknowledges receipt — this does not mean the user is logged in yet.

{
"accountId": "1234ab5678290....",
"requestID": "abc1234efh012....",
}
warning

Save this accountId. You will need it for all future actions.

Listen for the Result

Monitor your webhook endpoint for one of three scenarios:

Scenario A: Login Success

{
"status": "SUCCESS",
"requestId": "...",
"result": {
"first_name": "Wade",
"last_name": "Willson",
"profile_id": "ACoABC1d2f...",
"premium": true
}
}

Scenario B: Login PIN Required

If you didn't provide twoFASecret or used SMS 2FA:

  1. Receive webhook with event type LOGIN_PIN_REQUIRED
  2. Ask your user for the code sent to their phone/email
  3. Submit the code:
POST /api/v1/login_code

{
"accountId": "THE_ACCOUNT_ID",
"code": "123456",
"requestId": "THE_REQUEST_ID_FROM_WEBHOOK"
}

Scenario C: Failure

You'll receive a FAILED status with an error message:

ErrorCause
VALIDATION_ERRORValidation error, check payload
WRONG_PASSWORDInvalid LinkedIn credentials
ACCOUNT_RESTRICTEDLinkedIn has restricted the account
ACCOUNT_RESTRICTED_TEMPORARYLinkedIn has temporarly restricted the account
PHONE_CONFIRMATION_REQUIREDLinkedIn needs to confirm your phone number
WRONG_PINFailed to submit 2FA code after multiple attempts.
CODE_TIMEOUTFailed to submit 2FA code after multiple attempts.
TWO_FA_PIN_EXCEEDEDExceeded the maximum number of verification attempts.
PIN_FAILEDFailed to auto-submit 2FA code.
CAPTCHA_REQUIREDFailed to resolve captcha after multiple attempts.

Verify the Connection

Confirm the account is fully active with a test call:

POST /api/v1/me

{
"accountId": "1234ab5678290...."
}

If this returns the user's profile data, the connection is established and stable.