Handling Account Disconnections

Disconnect and reconnect accounts without worry of data loss.

When managing user lifecycles in your application, there are times when a user may want to remove a specific social account or revoke access entirely. Post for Me handles disconnections in a way that prioritizes security while preserving historical data for future re-connections.

Here is a breakdown of how the disconnection process works and what happens to the data.

The Disconnect Process

Disconnecting an account is a specific action that revokes our ability to post on the user's behalf without destroying the analytics history associated with that account.

How it works

You make a POST request to the /v1/social-accounts/{id}/disconnect endpoint. Upon success, the account's status is immediately updated to disconnected.

Security

Crucially, this process permanently removes the access tokens and refresh tokens associated with the account. Once disconnected, the API can no longer query feeds or publish posts for that specific account.

Data Preservation

Unlike a hard delete, disconnecting an account does not wipe the record from our database.

The Logic

We maintain the account record in a disconnected state. This ensures that if the user decides to reconnect the account later, their previous configuration, internal IDs, and historical data are preserved.

The User Experience

If a user disconnects their LinkedIn page but reconnects it a month later, your application can resume service immediately without needing to re-map the external IDs or lose track of previous posts.

Reconnecting an Account

To restore functionality to a disconnected account, the user must go through the authentication flow again.

How it works

You generate a new auth URL using the /v1/social-accounts/auth-url endpoint. When the user completes the login flow, the system detects the existing record and updates it with the new valid tokens, changing the status back to connected.