This plugin allows you to post to X (formerly Twitter) directly from Obsidian.
- Post to X (tweets) of selected text
- Post threads from file
- Automatically appends a tag to your post (to keep track of what you've posted)
- Secure mode - encrypts your API keys such that they can only be accessed with a password.
- Delete post/thread that was just posted (undo)
- Post Mode - a modal dedicated to writing posts and threads.
- Images are supported - just include a
[[link]]
to your images! - Scheduling posts - follow this guide to set it up.
Feel free to recommend features!
This plugin has been added to the community plugin browser in Obsidian. You can get it from there.
If you want to watch a video on how to set up this plugin, click here.
Please note that these steps are not necessary anymore. You can get the plugin from the community plugin browser. Just install from there and jump to Setup.
- Go to Releases and download the ZIP file from the latest release.
- This ZIP file should be extracted in your Obsidian plugins folder. If you don't know where that is, you can go to
Community Plugins
inside Obsidian. There is a folder icon on the right ofInstalled Plugins
. Click that and it opens your plugins folder. - Extract the contents of the ZIP file there.
- Proceed to Setup
- Go to developer.x.com and sign up for a developer account if you haven't already.
- Navigate to the Developer Portal and create a new Project.
- Within your Project, create a new App. Make sure to enable Read and Write permissions (required for posting).
- In your App settings, navigate to the "Keys and tokens" section.
- Generate and save the following credentials:
- API Key and API Key Secret (used for OAuth 1.0a authentication)
- Access Token and Access Token Secret (represents your account for posting)
- Paste these four values into the plugin settings in Obsidian.
Important Notes:
- Store your credentials securely - they only display once in the developer portal
- If you lose them, you'll need to regenerate new ones
- Ensure your App has "Read and Write" permissions, not just "Read"
- Your App must be attached to a Project (this is now required for X API v2)
You'll see an indicator which tells you if you're connected or not.
Using the Post Tweet
command, a new modal will open. There, you can craft threads - or single posts.
You can select both text or threads before using the command and it'll automatically port it into the modal. If the selected text is longer than 280 characters, it'll break it into a thread for you.
You can paste text into the modal. If that text is longer than 280 characters, it'll also break it into multiple posts.
Backspace
to delete empty postEnter
to make new post if max lengthAlt + Enter
to make new postCtrl + Enter
to insert a post belowShift + Enter
to insert a new post aboveCtrl + ArrowUp
to focus post aboveCtrl + ArrowDown
to focus post belowCtrl + Shift + ArrowUp
to move post upCtrl + Shift + ArrowDown
to move post downCtrl + Shift + Delete
to delete the post you have focused
Single posts are simple. Just select some text and use the Post Selected as Tweet
command.
Threads have a specific format. First off, it only detects the first thread in any file.
Format:
THREAD START
Here you can type the first post in your thread.
Spacing is fine.
---
Separation between posts is done using a newline and three dashes - just like you see above.
---
Enjoy!
THREAD END
Threads must start with THREAD START
and end with THREAD END
.
Follow this guide.
If you're seeing "TypeError: Cannot read properties of undefined (reading 'data')" or authentication errors even though the plugin shows as "connected":
-
Verify your X app is attached to a Project
- Go to developer.x.com
- Navigate to your app settings
- Ensure your app is attached to a Project (required for X API v2)
-
Check your system clock
- Authentication can fail if your system time is incorrect
- Ensure your computer's clock is synchronized
-
Regenerate your access tokens
- In the X Developer Portal, regenerate your Access Token & Secret
- Update the plugin settings with the new tokens
-
Verify app permissions
- Your X app must have "Read and Write" permissions
- If you recently changed permissions, regenerate your tokens
-
Check for token expiration
- X API tokens can expire after extended periods of non-use
- Simply regenerating them often resolves this issue
-
Verify Basic access is sufficient
- The free Basic tier should work for most use cases
- Check your usage limits in the developer portal if you're hitting rate limits
- Media upload failures: Ensure your image files are in a supported format (gif, jpg, jpeg, png, webp, bmp) and accessible in your vault.