Install
openclaw skills install x-oauth-apiPost to X (Twitter) using the official OAuth 1.0a API. Use when asked to "post to X", "tweet this", "post on Twitter", create threads, delete tweets, or check account info. Free tier compatible. NOT for search, mentions, or media uploads (requires Basic+ tier).
openclaw skills install x-oauth-apiPost to X (formerly Twitter) using the official X API with OAuth 1.0a authentication.
This skill provides direct access to X API v2 for posting tweets, managing threads, and monitoring mentions. No proxy or third-party service required — uses your X API credentials directly.
Use when:
Store these environment variables (from your X Developer Account):
X_API_KEY # Consumer Key (API Key)
X_API_SECRET # Consumer Secret
X_ACCESS_TOKEN # Access Token
X_ACCESS_TOKEN_SECRET # Access Token Secret
X_USER_ID # Optional: Your numeric user ID (speeds up mentions)
Free tier supports:
x me)Requires Basic+ tier:
# Post a simple tweet
x post "Hello from X API"
# Post a thread
x thread "First tweet" "Second tweet" "Third tweet"
# Check mentions
x mentions --limit 10
# Search recent tweets
x search "AI agents" --limit 5
x post <text>Post a single tweet.
Options:
--reply-to <tweet-id> - Reply to a specific tweet--quote <tweet-id> - Quote tweet--media <file> - Attach image/videox thread <tweet1> <tweet2> ...Post a tweet thread.
x mentions [options]Get recent mentions of your account.
Options:
--limit <n> - Number of mentions (default: 10, max: 100)--since <tweet-id> - Only mentions after this ID--format json - Output as JSONx search <query> [options]Search recent tweets.
Options:
--limit <n> - Number of results (default: 10, max: 100)--format json - Output as JSONx delete <tweet-id>Delete a tweet.
x meShow current account info (name, username, follower counts, user ID).
| Endpoint | Limit | Window |
|---|---|---|
| POST /2/tweets | 200 | 15 min (Free tier) |
| GET /2/tweets/search/recent | 100 | 15 min (Free tier) |
| GET /2/users/:id/mentions | 100 | 15 min (Free tier) |
Rate limits vary by access tier. See X API documentation for details.
OAuth 1.0a is handled transparently. Just provide your credentials via environment variables. The skill will sign all requests automatically.
"Unauthorized" error
"Rate limit exceeded"
"This endpoint requires a paid X API tier"
Free. X API is free for basic usage. Check your app's rate limits in X Developer Portal.
X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET).\n, OAuth signing will fail silently with a 401. Always verify with echo -n "$X_API_KEY" | xxd to confirm no whitespace.POST /2/tweets doesn't affect GET /2/users. Each endpoint has its own 15-minute window. Back off only the failing endpoint.