IntegrationsBuilt-in Providers

X

Connect X to your Appstrate agents.

Overview

X (formerly Twitter) is a microblogging social network, allowing your agents to post tweets, manage timelines, and interact with users.

Authentication Mode

PropertyValue
Typeoauth2 (with PKCE)
HeaderAuthorization: Bearer <token>
Default scopestweet.read, users.read, offline.access

Available Scopes

ScopeDescription
tweet.readRead tweets
tweet.writePost and delete tweets
tweet.moderate.writeModerate tweet replies
users.readRead user profiles
follows.readRead followers and following
follows.writeFollow and unfollow users
like.readRead likes
like.writeLike and unlike tweets
list.readRead lists
list.writeCreate and manage lists
bookmark.readRead bookmarks
bookmark.writeManage bookmarks
space.readRead Spaces
dm.readRead direct messages
dm.writeSend direct messages
offline.accessRefresh token (long-lived access)

Authorized URIs

The agent can access the following endpoints through the sidecar proxy:

  • https://api.x.com/*

Connect X

  1. Create a project and app in the X Developer Portal
  2. Enable OAuth 2.0 under "User Authentication Settings"
  3. Set type to "Web App" and add the Appstrate callback URL
  4. Copy the Client ID and Client Secret
  5. Enter these credentials in the X provider settings on Appstrate

Usage in an Agent

Once connected, the agent can call X APIs through the sidecar proxy. Example prompt:

Every morning, search for tweets mentioning our brand on X.
Analyze the sentiment of each mention (positive, neutral, negative).
For negative mentions, draft an empathetic response and post it
to the #social-media Slack channel for approval.

On this page