# Send X OAuth API to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "x-oauth-api",
    "name": "X OAuth API",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ngmeyer/x-oauth-api",
    "canonicalUrl": "https://clawhub.ai/ngmeyer/x-oauth-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/x-oauth-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-oauth-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "bin/x.js",
      "heartbeat.sh",
      "package-lock.json",
      "package.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "x-oauth-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T05:35:43.980Z",
      "expiresAt": "2026-05-18T05:35:43.980Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-oauth-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-oauth-api",
        "contentDisposition": "attachment; filename=\"x-oauth-api-1.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "x-oauth-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/x-oauth-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/x-oauth-api",
    "downloadUrl": "https://openagent3.xyz/downloads/x-oauth-api",
    "agentUrl": "https://openagent3.xyz/skills/x-oauth-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x-oauth-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x-oauth-api/agent.md"
  }
}
```
## Documentation

### X OAuth API Skill

Post to X (formerly Twitter) using the official X API with OAuth 1.0a authentication.

### Overview

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:

User says "post to X", "tweet this", "post on Twitter"
Need to create threads or media posts
Want to check mentions or engage with replies

### 1. Configure X API Credentials

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 vs Paid Tier

Free tier supports:

✅ Posting tweets and threads
✅ Deleting tweets
✅ Account info lookup (x me)

Requires Basic+ tier:

🔒 Search tweets
🔒 Fetch mentions
🔒 Media uploads

### 2. Basic Usage

# 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/video

Example:

x post "Check this out" --media image.jpg

### x thread <tweet1> <tweet2> ...

Post a tweet thread.

Example:

x thread \\
  "Thread about AI" \\
  "Here's what I learned" \\
  "Most important takeaway"

### 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 JSON

Note: Requires X_USER_ID env var OR will fetch it automatically (slower).

### x search <query> [options]

Search recent tweets.

Options:

--limit <n> - Number of results (default: 10, max: 100)
--format json - Output as JSON

### x delete <tweet-id>

Delete a tweet.

### x me

Show current account info (name, username, follower counts, user ID).

### API Rate Limits

X API v2 has rate limits per endpoint:

EndpointLimitWindowPOST /2/tweets20015 min (Free tier)GET /2/tweets/search/recent10015 min (Free tier)GET /2/users/:id/mentions10015 min (Free tier)

Rate limits vary by access tier. See X API documentation for details.

### Authentication

OAuth 1.0a is handled transparently. Just provide your credentials via environment variables. The skill will sign all requests automatically.

### Post with media

x post "Check out this screenshot" --media screenshot.png

### Reply to a tweet

x post "Great point!" --reply-to 1234567890123456789

### Create a 3-tweet thread

x thread \\
  "Just launched x-oauth-api skill" \\
  "It lets you post to X directly from your agent" \\
  "No proxies, direct OAuth 1.0a authentication"

### Search and reply

# Find interesting tweets
x search "agent framework"

# Reply to one
x post "Have you tried this?" --reply-to 1234567890123456789

### Troubleshooting

"Unauthorized" error

Check X API credentials are correct
Verify credentials are set in environment
Ensure your app has write permissions in X Developer Portal

"Rate limit exceeded"

Wait 15 minutes for limit to reset
Reduce request frequency
Check your tier limits at https://developer.twitter.com/en/portal/dashboard

"This endpoint requires a paid X API tier"

Search and mentions require Basic+ tier on X API
Free tier only supports posting, deleting, and account lookup
Upgrade at https://developer.twitter.com/en/portal/products

Tweet not posting

Check tweet is < 280 characters (or < 4000 with X Premium)
Verify no special formatting issues
Check X API status at https://api.twitterstat.us/

### Requirements

X Developer Account with API access
OAuth 1.0a credentials configured
Network access to api.twitter.com

### Cost

Free. X API is free for basic usage. Check your app's rate limits in X Developer Portal.

### Support

For X API issues, see: https://developer.twitter.com/en/docs/twitter-api
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ngmeyer
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-11T05:35:43.980Z
- Expires at: 2026-05-18T05:35:43.980Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/x-oauth-api)
- [Send to Agent page](https://openagent3.xyz/skills/x-oauth-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/x-oauth-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/x-oauth-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/x-oauth-api)