Terraform provider for X API monitors, webhooks & Twitter automation

August 20, 2026 ยท View on GitHub

CI CodeQL OpenSSF Best Practices

Manage Xquik monitors, signed webhooks, content workflows, and approved X actions as durable Terraform resources.

Quickstart | Provider docs | Examples | REST API | OpenAPI | Security

Manage durable X automation

Use resources for desired state and durable write records:

WorkflowResources
Compose and refine postscompose, draft, style
Monitor accounts and keywordsmonitor, monitor_keyword
Deliver signed eventswebhook
Publish and delete postsx_tweet, x_tweet_delete
Like, unlike, repost, and undo repostsx_tweet_like, x_tweet_unlike, x_tweet_retweet, x_tweet_unretweet
Follow, unfollow, and remove followersx_user_follow, x_user_unfollow, x_user_remove_follower
Send direct messages and upload mediax_dm, x_media
Update profiles, avatars, and bannersx_profile, x_profile_avatar, x_profile_banner
Create, delete, join, and leave communitiesx_community, x_community_delete, x_community_join, x_community_leave
Request support and guest checkoutsupport_ticket, guest_wallet

Every X write resource stores its canonical write-action response. The provider never retries an uncertain dispatch with a different idempotency key.

Read existing Xquik data

Use these data sources:

  • Account usage and limits: account
  • Drafts and writing styles: draft, style
  • Account and keyword monitors: monitor, monitor_keyword
  • Events and giveaway draws: event, draw
  • Tweet, user, and account lookups: x_tweet, x_user, x_account
  • Durable write status: x_write_action
  • Support requests: support_ticket

See the generated provider documentation for every field.

Run Twitter search outside Terraform

Terraform manages durable infrastructure and write records. Use the Xquik REST API for Twitter search, timeline extraction, follower exports, and other read jobs.

Use the API when you need to:

  • search tweets without the official Twitter API;
  • return structured tweet data through an X API;
  • extract an X or Twitter timeline;
  • export X followers or followings.

Use an Xquik SDK for application code. Use this provider for the surrounding Twitter automation.

Install

This provider requires Terraform CLI 1.0 or newer.

terraform {
  required_providers {
    x-twitter-scraper = {
      source  = "Xquik-dev/x-twitter-scraper"
      version = "~> 0.7"
    }
  }
}

provider "x-twitter-scraper" {}

Then run:

terraform init

Authenticate

Prefer environment variables:

export X_TWITTER_SCRAPER_API_KEY="your-api-key"

Bearer authentication uses X_TWITTER_SCRAPER_BEARER_TOKEN.

Never commit credentials or Terraform state.

Publish a tweet safely

Use one stable idempotency key per intended write.

resource "x-twitter-scraper_x_tweet" "announcement" {
  account         = "@example"
  idempotency_key = "terraform-announcement-v1"
  payload_json = jsonencode({
    text = "Published through the Xquik Terraform provider."
  })
}

Changing the request replaces the resource. Give the new write a new key.

Reliability & security

CI checks formatting, module integrity, race detection, Windows compilation, 90% statement coverage, 80% branch coverage, and reachable vulnerabilities. Releases use pinned actions, signed checksums, and GitHub attestations.

See OpenSSF evidence for the current criteria assessment.

Treat plans and state as sensitive. API responses can contain private data.

Report vulnerabilities through GitHub private reporting.

Develop locally

./scripts/bootstrap
./scripts/lint
./scripts/test

See CONTRIBUTING.md before changing generated code.

Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.