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

# X

> Post, search, and engage on X (formerly Twitter) — posts, timelines, lists, DMs, spaces, and relationships

# X

Shanone's X integration gives your agent 67 tools covering posting and engagement, timelines and search, lists, direct messages, and Spaces.

## Getting Started

<Steps>
  <Step title="Connect via OAuth">
    Ask your agent to do something with X (e.g. "post an update about our launch"), or connect proactively from **Integrations** in the Shanone dashboard.
  </Step>

  <Step title="Authorize the X account">
    Approve X's OAuth consent screen for the account you want Shanone to act on.
  </Step>

  <Step title="Retry your request">
    Once connected, `shanone_execute_tool` calls for `x_*` tools will succeed.
  </Step>
</Steps>

## Available Tools

Shanone provides **67 tools** for X, organized into these categories:

<AccordionGroup>
  <Accordion title="Posts">
    `x_create_post`, `x_delete_post`, `x_get_post`, `x_search_posts`, `x_get_user_posts`, `x_get_posts_by_ids`, `x_get_quote_posts`, `x_get_reposted_by`, `x_get_liking_users`, `x_get_liked_posts`, `x_get_post_counts`, `x_hide_reply`
  </Accordion>

  <Accordion title="Lists">
    `x_create_list`, `x_get_list`, `x_update_list`, `x_delete_list`, `x_add_list_member`, `x_remove_list_member`, `x_get_list_members`, `x_get_list_followers`, `x_get_list_posts`, `x_follow_list`, `x_unfollow_list`, `x_pin_list`, `x_unpin_list`, `x_get_owned_lists`, `x_get_followed_lists`
  </Accordion>

  <Accordion title="Relationships">
    `x_follow_user`, `x_unfollow_user`, `x_get_followers`, `x_get_following`, `x_block_user`, `x_unblock_user`, `x_mute_user`, `x_unmute_user`, `x_get_blocked_users`, `x_get_muted_users`
  </Accordion>

  <Accordion title="Direct messages">
    `x_send_dm`, `x_send_dm_to_conversation`, `x_create_group_dm`, `x_get_dm_events`, `x_get_dm_conversation_events`, `x_get_dm_event`, `x_delete_dm`
  </Accordion>

  <Accordion title="Spaces">
    `x_search_spaces`, `x_get_space`, `x_get_spaces_by_ids`, `x_get_spaces_by_creators`, `x_get_space_posts`, `x_get_space_buyers`
  </Accordion>

  <Accordion title="Media">
    `x_upload_media`, `x_upload_media_init`, `x_upload_media_append`, `x_upload_media_finalize`, `x_get_media_upload_status`
  </Accordion>

  <Accordion title="Engagement & bookmarks">
    `x_like_post`, `x_unlike_post`, `x_repost`, `x_undo_repost`, `x_bookmark_post`, `x_remove_bookmark`, `x_get_bookmarks`
  </Accordion>

  <Accordion title="Timeline & user">
    `x_get_home_timeline`, `x_get_mentions`, `x_get_me`, `x_get_user_by_username`, `x_get_users_by_ids`
  </Accordion>
</AccordionGroup>

## Common Use Cases

<CardGroup cols={2}>
  <Card title="Content scheduling & posting" icon="send">
    Draft and publish posts, optionally with uploaded media
  </Card>

  <Card title="Brand mention monitoring" icon="bell">
    Search recent posts or check mentions to spot and respond to conversations
  </Card>

  <Card title="Community list curation" icon="list-checks">
    Build and maintain a list of accounts (e.g. customers, partners) for targeted engagement
  </Card>

  <Card title="DM-based support" icon="mail">
    Read and reply to direct messages from a support or community account
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="x_upload_media fails for a large video file">
    Large media requires the chunked upload flow — call `x_upload_media_init`, then one or more `x_upload_media_append` calls, then `x_upload_media_finalize`, and poll `x_get_media_upload_status` before attaching the media ID to a post.
  </Accordion>

  <Accordion title="x_create_post with media attached is rejected">
    The media must finish processing (see `x_get_media_upload_status`) before its media ID can be referenced in `x_create_post` — attaching an in-progress upload will fail.
  </Accordion>

  <Accordion title="x_search_posts returns fewer results than expected">
    X's search API has retention/rate limits on the standard tier; very old posts or high-volume queries may return partial results. Narrow the query or check `x_get_post_counts` to sanity-check expected volume.
  </Accordion>

  <Accordion title="OAuth connection stops working after a while">
    X's OAuth 2.0 access tokens expire; if calls start failing with an auth error, reconnect from **Integrations** to refresh the token rather than assuming a persistent connection.
  </Accordion>
</AccordionGroup>
