Guides
Re-authorization
What to do when a website signs a user out.
Websites end sessions on their own schedule. When a run finds the connected account signed out, it fails with
session_expired and the connection becomes REAUTHORIZATION_REQUIRED.
What changes
Reading the connection and its executions still works, including the run that failed and its evidence. Creating
a run returns 409 CONNECTION_REAUTHORIZATION_REQUIRED. Retrying an earlier create request with the same
Idempotency-Key and body still returns its existing execution. This is an
idempotent replay, which retrieves the original run without starting another.
Recovering
Send the user through the auth link exactly as the first time. They sign in again on the connect page, the
connection returns to ACTIVE, and the code exchange issues a new token. connection_id and user_id don't
change, so replace the stored token and carry on.
Check terminal.status on every failed run, and when you see session_expired, show the user what happened
with the auth link ready, so reconnecting is one click.
Next steps
Connections and authorization explains the connection statuses.