> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TweetClaw for OpenClaw

> Install TweetClaw for OpenClaw. Search tweets, export followers, monitor X accounts, and run approved actions.

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

TweetClaw is the official OpenClaw plugin for using Xquik from an OpenClaw agent. It gives your agent a safe endpoint catalog, account-backed X automation, optional read-only MPP access, slash commands, and monitor notifications without exposing API keys to the model.

Use it when your OpenClaw workflow needs X search, user lookups, tweet posting, replies, likes, retweets, follows, DMs, monitors, webhooks, giveaway draws, extraction jobs, media actions, or trend reads.

## Prerequisites

* OpenClaw `2026.7.1` or newer
* Node.js `22` or newer
* [Xquik API key](/quickstart) for account-backed automation
* Optional [MPP setup](/mpp/quickstart) for anonymous read-only pay-per-use calls

<Warning>
  Install agent plugins only from trusted sources. OpenClaw plugin installs run code, and the official OpenClaw plugin CLI docs recommend pinned versions for production installs.
</Warning>

## Install

Install the official OpenClaw package. Current OpenClaw checks ClawHub first, then npm:

```bash theme={null}
openclaw plugins install @xquik/tweetclaw
```

For repeatable shared environments, pin the current published npm version:

```bash theme={null}
openclaw plugins install @xquik/tweetclaw@1.6.40 --pin
```

`@xquik/tweetclaw` is the official package. The plugin id is `tweetclaw`. The current published npm version and source-truth version are both `1.6.40`.

## Configure API Key Auth

Create an API key from the Xquik dashboard, then configure TweetClaw:

```bash theme={null}
export XQUIK_API_KEY="xq_..."
openclaw config set plugins.entries.tweetclaw.config.apiKey "$XQUIK_API_KEY"
```

API key auth unlocks account status, reads, monitor management, webhook management, extraction jobs, giveaway draws, media actions, and write actions for connected X accounts.

## Configure MPP Pay-Per-Use

MPP lets TweetClaw call 7 read-only X API endpoints at fixed prices without an Xquik account or API key. Use a guest `paid_reads` key when the workflow needs the broader 33-route prepaid catalog.

```bash theme={null}
npm i mppx viem
export MPP_SIGNING_KEY="0x..."
openclaw config set plugins.entries.tweetclaw.config.tempoSigningKey "$MPP_SIGNING_KEY"
```

MPP mode is read-only. Use API key auth when the agent needs private reads, account state, monitors, webhooks, extractions, draws, media downloads, media uploads, or write actions.

## Optional Settings

TweetClaw can poll Xquik events and surface monitor notifications in chat.

```bash theme={null}
openclaw config set plugins.entries.tweetclaw.config.pollingEnabled true
openclaw config set plugins.entries.tweetclaw.config.pollingInterval 60
```

Use the default base URL unless you operate a private Xquik deployment:

```bash theme={null}
openclaw config set plugins.entries.tweetclaw.config.baseUrl "https://xquik.com"
```

## Tools

<CardGroup cols={2}>
  <Card title="explore" icon="search">
    Search the bundled Xquik endpoint catalog and inspect parameters. This tool
    does not call the network.
  </Card>

  <Card title="tweetclaw" icon="terminal">
    Call catalog-listed Xquik endpoints with structured method, path, query, and
    body input. This tool can make network requests.
  </Card>
</CardGroup>

The `explore` tool is the safe first step. Ask the agent to inspect the catalog before it calls an endpoint:

```text theme={null}
Find the endpoint for searching tweets about AI agents, then show the required parameters.
```

The `tweetclaw` tool is optional because it can spend credits, read private account data, or perform write-like actions. If OpenClaw hides optional tools, allow it explicitly:

```bash theme={null}
openclaw config set tools.alsoAllow '["explore", "tweetclaw"]'
```

## Workflow Handoffs

Use `explore` first, then call `tweetclaw` only for the endpoint, target, and
limit you intend to run.

<CardGroup cols={2}>
  <Card title="Tweet Replies Export" icon="message-circle">
    Estimate `reply_extractor` with `targetTweetId`, create the extraction, poll
    `/api/v1/extractions/{id}`, then return CSV, JSON, and XLSX export URLs.
  </Card>

  <Card title="Follower Export" icon="users">
    Estimate `follower_explorer` with `targetUsername`, create the extraction,
    poll until completion, then export the job for CRM or warehouse import.
  </Card>

  <Card title="Monitor Webhook Handoff" icon="radio">
    Use `explore` to find monitor and webhook endpoints, then call `tweetclaw`
    for `POST /api/v1/monitors` or `POST /api/v1/monitors/keywords` and
    `POST /api/v1/webhooks` only after approval. Store the webhook `secret` in a secret manager. In receivers, verify `X-Xquik-Signature`, store
    `deliveryId` and `streamEventId`, return `2xx` for accepted duplicates, and
    keep endpoint signing values, raw request body, raw signature, and full
    headers out of chat logs and shared workflow outputs.
  </Card>

  <Card title="Media Tweets and DM Attachments" icon="image">
    For tweets or replies, call `POST /api/v1/x/tweets` with public media URLs
    in `media`. Store the durable action `id`, `status`, `billing`, `result`,
    and `statusUrl`. Poll while `terminal` is false. For DM attachments, upload
    media first, pass the returned `mediaId` as the one-item `media_ids` value,
    then store the DM action. Keep full DM bodies out of shared outputs and
    leave `reply_to_message_id` unset.
  </Card>
</CardGroup>

```text theme={null}
Use explore to find reply_extractor extraction endpoints.
Estimate replies for tweet 1893704267862470862.
Create the job with targetTweetId and resultsLimit 500 only if allowed.
Return extraction id, status, poll URL, and CSV, JSON, and XLSX export URLs.
```

```text theme={null}
Use explore to find follower_explorer extraction endpoints.
Estimate followers for @username with resultsLimit 10000.
Create the job only if allowed.
Return extraction id, status, poll URL, and CSV, JSON, and XLSX export URLs.
```

```text theme={null}
Use explore to find monitor and webhook endpoints.
Create an account monitor or keyword monitor only after approval.
Register the receiver URL with POST /api/v1/webhooks.
Store the webhook secret in a secret manager.
Verify X-Xquik-Signature, store deliveryId and streamEventId, and return 2xx for accepted duplicates.
Keep endpoint signing values, raw request body, raw signature, and full headers out of chat logs and shared workflow outputs.
```

```text theme={null}
Use explore to find media write endpoints.
For a tweet or reply, call POST /api/v1/x/tweets with media set to public HTTPS image or MP4 URLs. Do not send media_ids.
Send a unique Idempotency-Key. Store id, status, billing, result, and statusUrl. Poll while terminal is false. Retry only when safeToRetry is true, using a new key.
For a DM attachment, call POST /api/v1/x/media first, then POST /api/v1/x/dm/{userId} with one media_ids value. Leave reply_to_message_id unset.
Return the complete action record. Read the confirmed resource ID from result.id.
Keep full DM bodies out of shared outputs.
```

## Runtime Diagnostics

TweetClaw can be installed before credentials are configured. In that state, use `explore` for free endpoint discovery. Live API calls return setup guidance until you add an API key or MPP signing key.

Verify runtime registration after install or update:

```bash theme={null}
openclaw plugins inspect tweetclaw --runtime
openclaw skills info tweetclaw
```

If the agent can see the TweetClaw skill but cannot call the tools, add `explore` and `tweetclaw` to `tools.alsoAllow` so your normal tool profile stays intact.

Only change `baseUrl` for a self-hosted Xquik-compatible API. TweetClaw requires an HTTPS base URL with no embedded credentials.

## Slash Commands

<CardGroup cols={3}>
  <Card title="/xstatus" icon="terminal">
    Show the connected X account, email, locale, subscription status, plan, and
    usage when API key auth is configured.
  </Card>

  <Card title="/xtrends" icon="trending-up">
    Show current topics from Xquik Radar.
  </Card>

  <Card title="/xtrends tech" icon="search">
    Show current Xquik Radar topics filtered by the `tech` category.
  </Card>
</CardGroup>

## Safety Model

TweetClaw keeps credentials in plugin config and injects auth at request time. The model does not receive your API key or MPP signing key as a tool argument.

OpenClaw approval prompts apply before write-like `tweetclaw` calls. Review the structured request before approving any post, delete, follow, DM, monitor change, extraction, webhook change, media action, profile change, or community action.

Dashboard-only account-admin, billing, support-ticket, and raw credential flows are excluded from the agent catalog and blocked at runtime.

## API Coverage

TweetClaw exposes 102 agent-callable endpoints across 9 categories.

<CardGroup cols={3}>
  <Card title="account" icon="user">
    1 endpoint for account status and usage.
  </Card>

  <Card title="composition" icon="pen-line">
    13 endpoints for compose, drafts, writing styles, and radar.
  </Card>

  <Card title="credits" icon="coins">
    1 endpoint for credit balance reads.
  </Card>

  <Card title="extraction" icon="file-spreadsheet">
    9 endpoints for extraction jobs, giveaway draws, and exports.
  </Card>

  <Card title="media" icon="image">
    1 endpoint for authenticated tweet media downloads and gallery links.
  </Card>

  <Card title="monitoring" icon="radio">
    19 endpoints for account monitors, keyword monitors, events, and webhooks.
  </Card>

  <Card title="twitter" icon="search">
    38 endpoints for search, lookups, timelines, articles, trends, bookmarks,
    and notifications.
  </Card>

  <Card title="x-accounts" icon="users">
    1 endpoint for listing connected accounts before explicit user-selected
    actions.
  </Card>

  <Card title="x-write" icon="send">
    19 endpoints for post, reply, like, retweet, follow, remove follower, DM,
    profile, media, and community actions.
  </Card>
</CardGroup>

## Verify

After installing and configuring the plugin, run:

```text theme={null}
/xstatus
```

Then test a read-only workflow:

```text theme={null}
Search tweets about AI agents and return the top 5 results with author handles.
```

For write workflows, ask the agent to draft first and request approval before calling `tweetclaw`:

```text theme={null}
Draft a short launch tweet for Xquik. Do not post it until I approve the exact text.
```

## Troubleshooting

<CardGroup cols={2}>
  <Card title="Tools Missing" icon="terminal">
    Add `explore` and `tweetclaw` to `tools.alsoAllow`, run the runtime
    inspection commands, then restart OpenClaw.
  </Card>

  <Card title="Auth Fails" icon="key-round">
    Create a fresh Xquik API key and update
    `plugins.entries.tweetclaw.config.apiKey`.
  </Card>

  <Card title="MPP Setup Fails" icon="wallet">
    Install `mppx` and `viem`, fund the MPP account, and call only
    the 7 direct MPP operations.
  </Card>

  <Card title="Monitor Alerts Missing" icon="radio">
    Set `pollingEnabled` to `true` and keep `pollingInterval` at 60 seconds or
    higher.
  </Card>

  <Card title="Write Approval Required" icon="shield-check">
    Review the structured request and approve only the exact intended post,
    delete, follow, DM, monitor, extraction, webhook, profile, or community
    action.
  </Card>
</CardGroup>

## References

* [OpenClaw plugin CLI](https://docs.openclaw.ai/cli/plugins)
* [Hermes Tweet for Hermes Agent](/guides/hermes-tweet)
* [Xquik Billing](/guides/billing)
* [MPP Quickstart](/mpp/quickstart)
* [API Reference](/api-reference/overview)
