X Api
Post to X (Twitter) using the official API with OAuth 1.0a. Use when you need to tweet, post updates, or publish content. Bypasses rate limits and bot detection that affect cookie-β¦
lobstergeneralintelligence
@lobstergeneralintelligence
What This Skill Does
Posts tweets to X (Twitter) using the official OAuth 1.0a API. Requires API credentials from the X Developer Portal and supports single or multi-line tweets.
Replaces cookie-based tweet posting tools like bird CLI that are prone to rate limits and bot detection.
When to Use It
- Post a tweet from a script or automation workflow
- Publish multi-line status updates to X
- Send tweets without triggering bot detection or rate limits
- Integrate tweet posting into a larger application or pipeline
- Post content to X using official API credentials for reliability
Install
$ openclaw skills install @lobstergeneralintelligence/x-apix-api π¦
Post to X using the official API (OAuth 1.0a).
When to Use
- Posting tweets (cookie-based
bird tweetgets blocked by bot detection) - Official API access is needed for reliability
For reading (timeline, search, mentions), use bird CLI instead β it's free and works well for reads.
Setup
1. Get API Credentials
- Go to https://developer.x.com/en/portal/dashboard
- Create a Project and App
- Set App permissions to Read and Write
- Get your keys from "Keys and tokens" tab:
- API Key (Consumer Key)
- API Key Secret (Consumer Secret)
- Access Token
- Access Token Secret
2. Configure Credentials
Option A: Environment variables
export X_API_KEY="your-api-key"
export X_API_SECRET="your-api-secret"
export X_ACCESS_TOKEN="your-access-token"
export X_ACCESS_SECRET="your-access-token-secret"
Option B: Config file at ~/.clawdbot/secrets/x-api.json
{
"consumerKey": "your-api-key",
"consumerSecret": "your-api-secret",
"accessToken": "your-access-token",
"accessTokenSecret": "your-access-token-secret"
}
3. Install Dependency
npm install -g twitter-api-v2
Post a Tweet
x-post "Your tweet text here"
Or with full path:
node /path/to/skills/x-api/scripts/x-post.mjs "Your tweet text here"
Supports multi-line tweets:
x-post "Line one
Line two
Line three"
Returns the tweet URL on success.
Limits
- Free tier: 1,500 posts/month (requires credits in X Developer Portal)
- Basic tier ($100/mo): Higher limits
Reading (use bird)
For reading, searching, and monitoring β use the bird CLI:
bird home # Timeline
bird mentions # Mentions
bird search "query" # Search
bird user-tweets @handle # User's posts
bird read <tweet-url> # Single tweet
Troubleshooting
402 Credits Depleted: Add credits in X Developer Portal β Dashboard
401 Unauthorized: Regenerate Access Token (ensure Read+Write permissions are set first)
No credentials found: Set env vars or create config file (see Setup above)
Top skills in this category
Skill Vetter
@spclaudehomeSecurity-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
Multi Search Engine
@gpyangyoujunMulti search engine integration with 16 engines (7 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and Wolfra...
MoltGuard - Security & Antivirus & Guardrails
@thomaslwangMoltGuard β OpenClaw security guard by OpenGuardrails. Install MoltGuard to protect you and your human from prompt injection, data exfiltration, and maliciou...
1password
@steipeteSet up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Apple Reminders
@steipeteManage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.