X API Poster for Openclaw

A robust integration for posting text, images, and replies to X/Twitter using official API v2 and OAuth 1.0a.

sa9saq
v1.1.0
Feb 8, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install x-api-poster

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install x-api-poster using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is X API Poster?

The X API Poster is a specialized tool within the Openclaw Skills ecosystem designed to facilitate seamless interaction with the X (formerly Twitter) platform. By utilizing the official API v2 and OAuth 1.0a authentication, it allows developers to programmatically publish content, upload media, and manage conversational threads without leaving their development environment.

This skill prioritizes security and reliability, handling complex tasks like HMAC-SHA1 signature generation and media-specific upload workflows internally. Whether you are building an automated notification system or managing a brand presence, this skill provides the necessary infrastructure to interact with X effectively.

X API Poster Use Cases

  • Automating project updates or deployment notifications directly to social media.
  • Managing high-volume reply threads and community engagement via Openclaw Skills.
  • Programmatically uploading and sharing visual assets like PNGs, JPEGs, and GIFs.
  • Integrating X posting capabilities into custom AI agent workflows and scheduled tasks.

How X API Poster Works

  1. The skill loads OAuth 1.0a credentials from a secure environment file to authenticate the session.
  2. Input text is validated against the 280-character limit, accounting for automatic URL shortening.
  3. If an image is provided, the script performs a multi-part upload to the X v1.1 media endpoint to retrieve a media ID.
  4. A structured JSON payload is constructed, including the tweet text, media IDs, or parent tweet ID for replies.
  5. The payload is sent via a POST request to the X API v2, and the resulting tweet ID is returned to the user.

X API Poster Setup

Ensure you have Python 3.8+ and the requests library. Install dependencies using:

pip install requests

Create a project at developer.x.com, enable Read and Write permissions, and save your credentials in ~/.openclaw/secrets.env:

# ~/.openclaw/secrets.env
X_CONSUMER_KEY='your_key'
X_CONSUMER_SECRET='your_secret'
X_ACCESS_TOKEN='your_token'
X_ACCESS_TOKEN_SECRET='your_token_secret'

Apply secure permissions to your secrets file:

chmod 600 ~/.openclaw/secrets.env

X API Poster Data Schema & Taxonomy

The skill manages interaction data through the following schema:

Attribute Description Validation
text Main tweet content Max 280 chars (URLs ~23 chars)
image_path Local filesystem path to media PNG, JPEG, GIF, WEBP supported
reply_id ID of the target tweet for replies Must be a valid 64-bit integer
media_id Temporary ID returned by the media endpoint Valid for immediate attachment

X API Poster Advanced Features

  • Built-in HMAC-SHA1 signature generation for secure OAuth 1.0a requests without external libraries.
  • Intelligent media handling with specific support for large GIFs up to 15MB and images up to 5MB.
  • Automated rate limit detection and reporting to help users navigate Openclaw Skills within API tiers.
  • Duplicate tweet protection and character count validation to ensure high success rates for automated posts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*