skrzynka account/disconnect
Take back what `authorize`, `delegate` or `app-password` wrote for one address: revoke an OAuth grant at Google and move the credential item to Skarbiec's recoverable trash. The API equivalent is `POST /v1/gmail/disconnect` with `{"email": ...}` (owner or admin); Skrzynka Desktop offers it as **Disconnect account** on an undeclared mailbox.
Invocation#
skrzynka --organization <ID> account disconnect --provider gmail --email <EMAIL>Purpose#
Take back what authorize, delegate or app-password wrote for one address: revoke an OAuth grant at Google and move the credential item to Skarbiec's recoverable trash. The API equivalent is POST /v1/gmail/disconnect with {"email": ...} (owner or admin); Skrzynka Desktop offers it as Disconnect account on an undeclared mailbox.
Inputs and options#
| Input or option | Required | Meaning |
|---|---|---|
--email <EMAIL> | Yes | The address whose credential items (skrzynka-gmail-<digest> and skrzynka-gmail-app-password-<digest>) are removed. |
Global options accepted on this path are --organization <ID> (required on every command except serve, version and onboarding; none is assumed), --skarbiec-bin <PATH> (default skarbiec) and --text (print results as path: value lines for people instead of JSON).
Output and state effect#
For an oauth2 item, posts its refresh token to Google's revocation endpoint first; only after Google confirms, or answers invalid_token because the grant was already revoked or expired, is the item moved to trash with skarbiec delete. Prints {email, removed:[{item, auth_method, google_grant}]}, where google_grant is revoked, already_invalid, or none for an app password or delegation, which the account owner or the Workspace admin console revokes. The mailbox's local mail is untouched; mailbox remove deletes it.
Refusals#
- Missing
--emailis refused by Clap with exit 2; a missing--organizationexits 2 asORGANIZATION_REQUIRED. GMAIL_ACCOUNT_NOT_CONNECTED:Skarbiec holds no Skrzynka credential for <EMAIL>; nothing to disconnect.GMAIL_MAILBOX_DECLARED:<EMAIL> is still a declared mailbox (Skarbiec item <ITEM>); run skrzynka mailbox undeclare <ID> with the ID skrzynka mailbox list prints, then disconnect. Nothing is revoked or deleted.GMAIL_REVOKE_UNAVAILABLE(retryable:true, exit 69): Google's revocation endpoint could not be reached; the credential was kept.GMAIL_REVOKE_FAILED: Google refused the revocation with its status and answer; the credential was kept. Retryable, exit 69, only for a server error.SKARBIEC_WRITE_FAILED:Skarbiec refused to delete item '<ITEM>': <DETAIL>, with Skarbiec's own words.