Skip to main content

Account Status & Health

We-Link provides a set of Account Management endpoints to monitor the status of connected LinkedIn accounts, inspect individual account health, and verify active sessions.

List All Connected Accounts

Retrieve all LinkedIn accounts associated with your API key.

Endpoint: POST /api/v1/get_all_ln_accounts

curl -X POST https://api.we-link.ai/api/v1/get_all_ln_accounts \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{}'

Response:

[
{
"accountId": "1234ab5678290....",
"email": "jane.doe@example.com"
},
{
"accountId": "54321zy1234567....",
"email": "john.smith@example.com"
}
]

Get Account Details

Query the system for a specific account's registered status, profile mapping, and activity state.

Endpoint: POST /api/v1/get_ln_account_details

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

Response:

{
"accountId": "1234ab5678290....",
"email": "jane.doe@example.com",
"status": "ACTIVE",
"firstname": "Jane",
"lastname": "Doe"
}

Heartbeat Check (Verify Active Session)

An account might be listed as "Active" in the database but have an expired session (e.g., if the user changed their LinkedIn password). The /me endpoint confirms the connection is truly live.

Endpoint: POST /api/v1/me

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

Success Response (Session Valid)

{
"status": "SUCCESS",
"request_id": "abc1234efh012....",
"result": {
"first_name": "Wade",
"last_name": "Willson",
"full_name": "Wade Willson",
"headline": "Software Engineer",
"location": "San Francisco, CA",
"is_premium": true,
"profile_id": "ACoABC1d2f...",
}
}

Failed Response (Session Expired)

{
"message": "Linked account not active",
  "error": "Bad Request",
  "statusCode": 400
}
What to do if a session expires

We-Link automatically refreshes sessions when a 2FA secret is stored. If auto-refresh fails, re-authenticate the account using the login endpoint.