social.grain.server.deleteAccount

Deletes the asking account's grain data a part at a time, as knotless's dev.knotless.deleteAccountData does. Asked by the web's session cookie, from a page of the site, it deletes the account's records in every social.grain.* collection at its PDS with the session grain keeps for it, up to `limit` records a call, and answers whether it is done; the web asks again until it is, and a run cut short carries on where it stopped. Once nothing is left, grain drops what it indexed from the account, as for one deleted at its PDS, with its preferences, notification state, push tokens, mutes, story views and space invitations, keeping its takedowns, the labels given out and the reports about it; and it ends the account's web session, revoked at its PDS, logging the browser out of it. Asked with a service token, as the apps ask once they have deleted the records at their own PDS, it deletes nothing, and forgets the account only once its PDS lists no social.grain.* collection. The atproto account itself, and other apps' records in it, a Bluesky cross-post among them, are untouched. Only the account itself can ask.

Repository @grain.social did:plc:e7rftrdyz5e2rw4y6ocszew2 namespace authority
Details · procedure
Kindprocedure
Authorityserver.grain.social
Commit rev3n2mx2m24uobg
Indexed

Showing version bafyreibmvjluild5lag3jfoklw7ngh2q2cktsojzcnet7og74ihqemstaq. Show the latest

Procedure

procedure · POST

Input

application/json

did

requiredstring · did

The account whose data goes: the one asking, named again so that no call deletes it by mistake.

limit

integer

The most records to delete in this call.

  • minimum: 1
  • maximum: 1000
  • default: 400

Output

application/json

deleted

requiredinteger

How many records this call deleted.

  • minimum: 0

done

requiredboolean

Whether nothing is left: grain has then forgotten the account, and logged it out.

Errors

AuthenticationRequired

No account asks, or the web's session for it has ended.

Forbidden

The account asking is not the one named, or the cookie was sent from another site.

RecordsRemain

Asked with a service token while the account's PDS still holds grain records: delete them first.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Deletes every knotless record from the asking account, then has the appview forget it.

  • Delete the authenticated user's Grain account. Removes all of their Grain records from their PDS and clears supporting server-side state (mutes, preferences, push tokens, OAuth session). Reports and labels are preserved.

  • Plan the next part of deleting the viewer's grain data, for an app to delete at the viewer's own PDS: the deletes of one com.atproto.repo.applyWrites, of the viewer's records in every social.grain.* collection their PDS lists, read from the PDS rather than grain's index, so that records grain never indexed go too. Collections go in the order social.grain.server.deleteAccount deletes them, what hangs off a gallery before the gallery and the profile last, and one is exhausted before the next begin

  • Deletes everything the AppView holds for the authenticated user.

  • Erases the requesting user's Colibri data held by this AppView. This does not touch the user's repos, which only they control.