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:
- 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 Settings → Security → Create API Key
- Name your key, configure IP restrictions and allowed actions, then save
- Copy your
x-api-keyandx-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.
- Log in to LinkedIn manually in your browser
- Navigate to Settings & Privacy → Sign in & security → Two-step verification
- Choose Authenticator App as your verification method
- Copy the Secret Key displayed below the QR code — you'll send this to We-Link
- Complete the setup by scanning the QR code and entering the 6-digit verification code
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:
| Header | Value |
|---|---|
x-api-key | Your API key |
x-api-secret | Your API secret |
Content-Type | application/json |
Using Internal Proxy (Recommended)
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"
}
}
For a full explanation of proxy options, validation, billing, and best practices, see Proxy Configuration.
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....",
}
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:
- Receive webhook with event type
LOGIN_PIN_REQUIRED - Ask your user for the code sent to their phone/email
- 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:
| Error | Cause |
|---|---|
VALIDATION_ERROR | Validation error, check payload |
WRONG_PASSWORD | Invalid LinkedIn credentials |
ACCOUNT_RESTRICTED | LinkedIn has restricted the account |
ACCOUNT_RESTRICTED_TEMPORARY | LinkedIn has temporarly restricted the account |
PHONE_CONFIRMATION_REQUIRED | LinkedIn needs to confirm your phone number |
WRONG_PIN | Failed to submit 2FA code after multiple attempts. |
CODE_TIMEOUT | Failed to submit 2FA code after multiple attempts. |
TWO_FA_PIN_EXCEEDED | Exceeded the maximum number of verification attempts. |
PIN_FAILED | Failed to auto-submit 2FA code. |
CAPTCHA_REQUIRED | Failed 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.