Skip to main content

Overview

OneCLI connects AI agents to X through OAuth. Agents can search and read posts, read timelines and mentions, and post, like, follow, or send DMs. The gateway injects the token into every request, so your agent never sees it. X uses your own X developer app, on OneCLI Cloud and self-hosted alike. Setup takes about five minutes, once.

Connect X

1

Create an X app

In the X Developer Portal, open Projects & Apps and create an app. Under User authentication settings, turn on OAuth 2.0, set the type to Web App, and set permissions to Read and write and Direct message.
2

Add the callback URL

In OneCLI, open Connections > X > Custom credentials and copy the Redirect URI. Paste it into the X app’s Callback URI / Redirect URL and save.
3

Add your credentials and connect

Copy the app’s OAuth 2.0 Client ID and Client Secret into Custom credentials, click Save credentials, then click Connect X and Authorize app on X.
OneCLI connect window for X showing Configuration required, the setup guide link, and the Configure credentials button.

The X connect window in OneCLI before credentials are added.

What agents can do

Controlling access

Grant the connection to each agent that needs it, and choose per tool what runs freely, what needs approval, and what’s blocked. Anything that posts publicly or messages people (Create post, Send DM, Repost, Follow) belongs behind approval. Organization rules add guardrails on top. A blocked request never reaches X. To disconnect, remove the connection in Connections > X, then revoke OneCLI on X under Settings > Security and account access > Apps and sessions.