Skip to main content
A connected LinkedIn account does not stay connected on its own. Sessions expire and LinkedIn raises verification steps. This page covers watching for that with webhooks, recognising it when it happens, reconnecting, and restarting the runs that stopped.

Connecting a LinkedIn Identity

Licence compatibility, and every way to connect an account in the first place.

How to tell an integration is invalid

Watch for these signals: Fetch the run with Get Run and read last_error.error_label when a run is BLOCKED. A timezone or VPN mismatch is a common cause of login failures — see Timezone & VPN Settings.

Monitor integration status with webhooks

LinkedIn integrations have a lifecycle that you can monitor in real-time using webhooks. Whether the integration was created through user interaction, frontend operations, or API calls, webhooks provide instant notifications about status changes. Webhooks send HTTP requests to your platform when integration events occur, allowing you to:
  • React immediately to authentication issues
  • Notify users about account status changes
  • Trigger automated responses (e.g., resync flows)
  • Monitor integration health proactively

Setup Process

1

Configure Your Webhook URL

Configure a webhook URL in the developer section of your Edges workspace.
Webhook URL Requirements:
  • Must be HTTPS (e.g., https://your-domain.com/webhooks)
  • Supports extended URLs with basic auth, ports, and query parameters (up to 1024 characters)
  • Example: https://user:pass@your-website.com:8080/webhooks/edges/linkedin-integration?foo=bar
You can also add up to 10 custom headers (e.g., API keys) that will be included with each webhook call.
2

Implement Your Webhook Handler

Each LinkedIn integration event triggers a POST request to your configured URL with this JSON payload:
Field Explanations

Event Types

Use Cases

1. Handle Expired Sessions

When you receive an AUTH_EXPIRED event with action_to_be_taken: "RETRY_LOGIN", you can:
  • Trigger immediate resync via API call
  • Notify users to re-authenticate
  • Pause dependent workflows until resolved

2. Monitor Native Login Workflow

When using the native login workflow, users complete authentication asynchronously. The AUTH_SUCCESS event confirms when setup is complete.
Best Practices:
  • Ensure your webhook endpoint handles POST requests and JSON payloads
  • Implement proper error handling and logging
  • Consider verifying webhook authenticity (e.g., via headers)
  • Respond quickly to webhook requests (within 5 seconds)

Reconnect the integration

Managing Chrome sessions

  • Use Edges’s Chrome Extension to automatically sync cookies, useful for testing purposes.
  • If you’re using multiple LinkedIn accounts on the same browser, you must create separate Chrome profiles:
    • Click your Chrome profile icon > Add a new profile.
    • Name it according to the LinkedIn account (e.g., “Account B”).
    • Log in to Edges and LinkedIn within this new session.
Updating cookies for Account A while logged into Account B can lead to mismatches and errors.

Refreshing cookies

Cookies need refreshing if:
  • You log out of LinkedIn
  • LinkedIn expires or changes cookies
  • LinkedIn restricts the account due to excessive activity
Regular activity and following Smart Limits guidelines help prevent restrictions.

How to refresh cookies via API

To refresh accounts via API, use the Connect an Identity’s Integration endpoint by passing the updated li_at and/or li_a cookie values:
If you build your own Chrome Extension, you should refresh cookies every 2 hours or so.
Here’s a code example for a Chrome Extension that runs in the background using alarms:
Complete source code is available on GitHub.
You can also reconnect through native LinkedIn login (email and password). If LinkedIn presents a checkpoint, use the Checkpoint endpoint.

Runs that blocked while it was invalid

BLOCKED is not terminal. After the integration is valid again, resume the run.
Reconnect before you resume. Resuming a run whose identity is still invalid consumes a retry and blocks again immediately.
See Recovering a Blocked Run for the full cause → recovery table (LK_BAD_COOKIE, login errors, and more).

Troubleshooting login errors

When connecting a LinkedIn account natively (with username and password), you may hit one of the errors below. Each row gives the message you’ll see, the status code, and how to resolve it.

Common error cases

Notes & recommendations

  • Google Login: If your LinkedIn account uses Google login, you must set a password on LinkedIn (via “Forgot password”) to use native login.
  • IP/Location Issues: Many errors are related to IP allocation or location mismatches. Make sure your timezone and country settings in Edges match your actual login location.
  • Challenge/2FA: If you receive a challenge (SMS, email, in-app), complete it promptly. If it expires, restart the login process.
  • Contact Support: For persistent or unclear errors, contact support and provide your identity_uid for faster resolution.

Connect with username & password

Endpoint reference for the native login flow.

Resolve a checkpoint

Endpoint reference for clearing a verification step.