/twitter-audit-log

Back up Twitter follow/mute/block lists periodically using GitHub Actions

Primary LanguageGo

⚠️ Doesn't work anymore. Needs to be ported to /v2/ but even then basic API tier doesn't have access to follower list and the endpoints we use here. Thanks El*n.

Twitter account backup/audit via GitHub Actions

This repository periodically runs a GitHub Action to backup various parts of my Twitter account:

(Twitter does not offer an API for exporting muted words.)

You can fork this repository and make it work for your account.

Set up

This code currently uses both Twitter v1 and v2 APIs. v2 API is currently behind a manual approval process.

  1. Fork this repository.

  2. git rm *.txt (delete my backups), git commit, git push

  3. Create a Twitter app from Developer Portal.

  4. Go to GitHub Repository SettingsSecrets and add secrets from the Twitter app you created in previous step:

    • TWITTER_CONSUMER_KEY
    • TWITTER_CONSUMER_SECRET
    • TWITTER_ACCESS_TOKEN
    • TWITTER_TOKEN_SECRET
  5. (Optional) Modify the cron schedule (in UTC) as you see fit in .github/workflows/update.yml. Commit and push.

  6. GitHub will trigger the scheduled action and backup the lists to .txt files as commits to your forked repository.