
This custom server translates Twitter V1 requests to Bluesky for Twitter clients.
To see what devices and versions are compatible, look at the compatibility list
https://twb.preloading.dev HTTP & HTTPS, Based on Releases (my instance) (old url still works)
https://ttwb.preloading.dev HTTP & HTTPS, Based on commits (my instance) (old url still works)
http:// or https:// at the beginning. Do not include a slash at the end. You can find these urls/servers in the Public Instances section above.http://cydia.bag-xml.com or http://cydia.skyglow.es to the sources tabBluetweety tweak, and install it.http:// OR https:// AT THE BEGINING AND THE SLASH AT THE END!!! You can find a list of URLS in the Public Instances sectionpreloading.bsky.social and your app password (can be the same from the app) in the respective areas. You can get an App Password here
Or through BlueSky > Settings > Privacy and security > App passwords if you'd rather navigate to it yourselfFor hosting, you can take two paths - 🐳 Docker - Quick & easy to deploy + easy updating - 🖥 Bare metal (recommended) - Useful when developing & debugging
Warning: Docker at present moment has some preformance issues, if anyone competent in docker has any idea why, please leave a github issue :)
I assume you have some competency in docker.
Docker Compose:
services:
twitter-bridge:
# image: ghcr.io/preloading/twitterapibridge:main # main = releases/stable
image: ghcr.io/preloading/twitterapibridge:dev # dev=latest commits/test version
environment:
- TWITTER_BRIDGE_DATABASE_TYPE=sqlite
- TWITTER_BRIDGE_DATABASE_PATH=/config/database/sqlite.db
- TWITTER_BRIDGE_CDN_URL=http://127.0.0.1
- TWITTER_BRIDGE_SERVER_PORT=3000
- TWITTER_BRIDGE_TRACK_ANALYTICS=true
- TWITTER_BRIDGE_DEVELOPER_MODE=false
ports:
- "80:3000"
volumes:
- '/opt/twitterbridge/sqlite:/config/sqlite' # Path where the SQLite DB is stored. It is safe to remove if you aren't using SQLite for your database.
| Env | Function | Default |
|---|---|---|
TWITTER_BRIDGE_DATABASE_TYPE |
They type of database to connect to. Options include sqlite, mysql, and postgres. | "sqlite" |
TWITTER_BRIDGE_DATABASE_PATH |
Changes where it looks for the database (Path/DSN) (see https://gorm.io/docs/connecting_to_the_database.html) | "/config/database/sqlite.db" |
TWITTER_BRIDGE_CDN_URL |
The CDN_URL is the URL where clients can access images from this server. Do not include a trailing slash. | "http://127.0.0.1:3000" |
TWITTER_BRIDGE_IMG_DISPLAY_TEXT |
The display URL shown in tweets for images. See config.sample.yaml for more info. | "pic.twitter.com/{shortblob}" |
TWITTER_BRIDGE_VID_DISPLAY_TEXT |
The display URL shown in tweets for videos. See config.sample.yaml for more info. | "pic.twitter.com/{shortblob}" |
TWITTER_BRIDGE_IMG_URL_TEXT |
The URL where the client will go when clicking an image link. See config.sample.yaml for more info. | "http://127.0.0.1:3000/img/{shortblob}" |
TWITTER_BRIDGE_VID_URL_TEXT |
The URL where the client will go when clicking an video link. See config.sample.yaml for more info. | "http://127.0.0.1:3000/img/{shortblob}" |
TWITTER_BRIDGE_SERVER_PORT |
The port where the server is running | 3000 |
TWITTER_BRIDGE_TRACK_ANALYTICS |
Enables tracking of analytics (at the moment the only way to view this is by looking at the database) | true |
TWITTER_BRIDGE_USE_X_FORWARDED_FOR |
Uses X_Forwarded_For when used thru a proxy. | false |
TWITTER_BRIDGE_DEVELOPER_MODE |
Enables extra loggging of data useful for debugging. WARNING!: DO NOT ENABLE ON A PUBLIC INSTANCE!!!! | false |
TWITTER_BRIDGE_MIN_TOKEN_VERSION |
Sets the minimum token version. If this is a new server, it should be set to 2. If you want to keep older users signed in, set it to 1 | 1 |
TWITTER_BRIDGE_SECRET_KEY |
The JWT secret key. KEEP THIS SECRET!!!! This follows everything that a normal JWT must be. | None |
TWITTER_BRIDGE_SERVER_IDENTIFIER |
A way for other services to know which server issued a token. Try to keep this unique across servers. | None |
TWITTER_BRIDGE_SERVER_URLS |
URLs your server can be accessesed, stored in the token. | None |
This assumes you are somewhat competent
git clone https://github.com/Preloading/TwitterAPIBridge.git
If you want to just run this in the directory when you found config.sample.yaml
go run .
If you want to build the project run this in the directory when you found config.sample.yaml
go build .
This server is no where close to 100% accurate. Most of the the time this accuracy is having more values responed than what should be, and it shouldn't affect clients using this.
I give some support in bag's server under #bluetweety, https://discord.gg/bag-xml
@Preloading, I wrote the thing
@Savefade, Gave me info on some of the requests
@retrofoxxo, Helped with getting android working with this server
$ claude mcp add TwitterAPIBridge \
-- python -m otcore.mcp_server <graph>