I want to delete all of my toots (status posts) at Mastodon but can't get all the toots.
It would be easier if I delete my account, though I want to keep my account alive and clean up all the mess that my NEWS-BOT did.
It seems that currently, Mastodon doesn't have the ability to delete all the toots as a standard feature.
So I tried to delete them using the Mastodon API recursively as below, but couldn't get all the Toot IDs (Status IDs) for deletion.
GET
Toot IDs from /api/v1/timelines/home
endpoint.
curl -X GET --header 'Authorization: Bearer <ACCESS_TOKEN>' -sS https://sample.com/api/v1/timelines/home
DELETE
a toot at /api/v1/statuses
endpoint with Toot IDs that I got.
curl -X DELETE --header 'Authorization: Bearer <ACCESS_TOKEN>' -sS https://sample.com/api/v1/statuses/<Toot ID>
Loop 2 then 1 until empty.
It cleaned up the home timeline. But many toots were left on the public profile page. I also tried to get the IDs from the ATOM feed but didn't help.
All I need is the list of my Statuses IDs that I'd tooted. Any ideas?
As of @unarist's advice,
API endpoint
https://sample.com/api/v1/accounts/<account id>/statuses
will do the fetching.
Though, there are 3 points to be noted:
It seems that I had over requested and couldn't get the info I needed. So better be careful about the server's message! (>_<)/
Have a good Mastodon time!
Home timeline contains not only your posts but also posts from your followings, and the server only keeps recent posts (400 items by default) of each home timeline. Therefore, you cannot enumerate all your posts from it.
Use account statuses API with your account id:
https://sample.com/api/v1/accounts​/<account id>/statuses
This API is what WebUI uses on your profile page (/web/accounts/xxx).