Skip to main content

Disconnecting an Account

When you need to remove a LinkedIn account from We-Link, the disconnection process ensures all active sessions are terminated cleanly and any pending tasks are cancelled gracefully.

Disconnect an Account

To disconnect a LinkedIn account, use the account management endpoint:

Endpoint: POST /api/v1/disconnect_account

curl -X POST https://api.we-link.ai/api/v1/disconnect_account \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"accountId": "550e8400-e29b-41d4-a716-446655440000"
}'

Response:

{
"message": "Account disconnected successfully"
}

What Happens on Disconnect

When you disconnect an account:

  1. Active sessions are terminated immediately
  2. Pending tasks in the queue are cancelled
  3. Stored credentials and 2FA secrets are securely removed
  4. Webhook subscriptions related to the account stop receiving events
  5. The accountId becomes inactive and cannot be used for further actions

Reconnecting

If you need to reconnect a previously disconnected account, follow the standard connecting an account process. A new accountId will be generated.

warning

Disconnecting an account is irreversible. All queued tasks will be lost. Make sure all critical operations have completed before disconnecting.