-
Open your account in the browser (i.e., open https://hachyderm.io and make sure you're logged in).
-
Open the inspector (Firefox: https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/open_the_inspector/index.html, Chrome: https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/open_the_inspector/index.html, Safari: https://developer.apple.com/documentation/safari-developer-tools/inspecting-safari-macos, then https://developer.apple.com/documentation/safari-developer-tools/web-inspector).
-
Make sure the inspector is showing network requests
-
Reload the page (Ctrl-R). This should trigger a notification fetch.
-
In the network inspector select the request for
home
(in the "File" column -- you can filter to just "XHR" requests at the top of the inspector to limit the number of entries you need to look at) with a "200" status response. -
In the inspector's "Headers" panel is a subsection, "Request Headers".
-
In that section, look for the entry that starts "Authorization:". It will be followed by
Bearer
, and then a string of characters. This is the token we need.
(assumes a Unix-like environment with curl
and jq
installed)
- Set the token as an environment variables
export TOKEN=<string of characters from step 1.8>
- Make the request.
curl -s -H "Authorization: Bearer $TOKEN" "https://hachyderm.io/api/v1/notifications?include_filtered=true&limit=90"" | jq > out.json
- Use jq to redact the notifications
I'm only interested in moderator / admin related notifications, since those are the ones I can't trivially generate myself. To generate the redacted list run this:
jq -c 'map(select(.type == "admin.sign_up" or .type == "admin.report" or .type == "severed_relationships" or .type == "moderation_warning"))' < out.json | jq > filtered.json
That will filter the notifications to just admin/moderator related types (the list of types is at https://docs.joinmastodon.org/entities/Notification/#type).
- (optional) review and perform further redaction
You may want to further redact the contents of filtered.json.
It shouldn't contain any content from yours or anyone else posts.
It will contain information about accounts referenced in those notifications, and the IDs of different statuses referenced in those notifications.
You can do that by hand editing the JSON if absolutely necessary. Obviously, the more hand editing you do the greater the risk of inadvertently corrupting the file.
Do not attach this to a GitHub issue
E-mail redacted.json
to [email protected]. The data will be treated as confidential, and deleted when debugging is complete.