Share your blocks and subscribe to others'
Clone or download
Latest commit 80ef684 Sep 17, 2018
Failed to load latest commit information.
bin Remove symlink from nodejs to node. Dec 17, 2017
config Remove mysql dependency to start services. May 28, 2018
docs Update doc. Oct 31, 2014
externs Remove My Unblocks. Oct 7, 2014
migrations Make actions id a bigint. Oct 2, 2017
old-migrations Reboot migrations Nov 14, 2015
static More blog tweak. Jun 25, 2018
templates Remove auto-block features from index (#261) Aug 16, 2018
test Use old-style function. Oct 9, 2017
util Further clarify comment. Sep 8, 2016
.gitignore nit Jan 18, 2015
.travis.yml Use Node 8. Oct 10, 2017 Add Code of Conduct Apr 9, 2016
COPYING Add GPL. Aug 4, 2014
Capfile Move to Capistrano for releases. Aug 9, 2014 readme: fix sed command to edit config in-place (#227) Aug 27, 2016
Vagrantfile Use clustering for web frontend. Oct 31, 2016
actions.js Fix type field in stat. Sep 17, 2018
blocktogether.js Layout improvements to show-blocks. Jun 11, 2018
deleter.js Add duplicate actions cleanup in deleter. Nov 15, 2017
jwurl.js Remove function wrappers. Oct 29, 2017
many-blocks.js Remove function wrappers. Oct 29, 2017
package.json Add heapdump to actions. Dec 17, 2017
remove-bogus-external.js Remove function wrappers. Oct 29, 2017 Fix log name. Oct 23, 2017
setup.js Remove function wrappers. Oct 29, 2017
subscriptions.js Memory use optimizations for update-blocks. Nov 13, 2017
twurl.js Remove function wrappers. Oct 29, 2017
unblock-all.js Remove function wrappers. Oct 29, 2017
update-blocks.js Update criteria for block updates. Aug 27, 2018
update-users.js Re-enable stale users loop. Nov 13, 2017
util.js Remove function wrappers. Oct 29, 2017
verify-credentials.js Remove function wrappers. Oct 29, 2017

Block Together

An API app intended to help cope with harassers and abusers on Twitter.

See more details at

Developer Setup Instructions

First, create an app on Twitter for your local version of blocktogether:

  1. Head to and click "Create New App."

  2. Fill out form & click "Create your Twitter application". Important: fill in some arbitrary URL for 'Callback URL.' It will be overridden by the app, but if it's empty you won't be able to log in. The description and website don't matter; You'll only be using this for testing.

  3. Under "Application Settings" > "Access level", click "modify app permissions" and select "Read and Write" access. The write permission is necessary to apply blocks, unblocks, and mutes. You may need to add a phone number to your account in order to get read/write permission.

  4. After you've set the read-write permissions, click the "Keys and Access Tokens" tab. Note that changing your app's permissions will regenerate these keys.

  5. Copy config/development.json to ~/.btconfig.json, and edit the "consumerKey" and "consumerSecret" fields to match the "Consumer Key (API Key)" and "Consumer Secret (API Secret)" fields from the "Keys and Access Tokens" page.

Next, make sure that you have Vagrant installed. From the blocktogether directory, run:

vagrant up
vagrant ssh -c /vagrant/

You can now access your local version of Block Together in a browser at http://localhost:3000.

Note: It's highly recommended you create a few test accounts on Twitter in order to be able to exercise the sharing functionality of Block Together, and so that you don't create or delete blocks on your main account unintentionally.

Developing locally

It’s recommended that you develop in a Vagrant instance; but if you want to develop on your local machine the steps are these:


  1. brew install mysql node (MariaDB can be used in place of MySQL)
  2. brew services start mysql
  3. In MySQL, create a ’blocktogether’ database, a 'blocktogether'@'localhost' user, and grant the latter privileges on the former (see bin/
  4. sed -i 's/__PASSWORD__//' config/sequelize.json (unless you set a database password; then replace __PASSWORD__ with that)
  5. openssl req -new -newkey rsa:2048 -nodes -days 10000 -x509 -keyout config/rpc.key -out config/rpc.crt -subj /CN=blocktogether-rpc
  6. Make a test Twitter account and an app with read/write permissions (follow the instructions above), and add its keys to config/development.json
  7. cp config/development.json config/config.json
  8. npm i
  9. ./node_modules/.bin/sequelize --config config/sequelize.json db:migrate
  10. export BT_CONFIG_DIR=$(pwd)/config
  11. ./


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see