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:
- Active sessions are terminated immediately
- Pending tasks in the queue are cancelled
- Stored credentials and 2FA secrets are securely removed
- Webhook subscriptions related to the account stop receiving events
- The
accountIdbecomes 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.