X (Twitter) logo

X (Twitter)

SandBaseapi

Published June 21, 2026

About

Access the X (Twitter) API v2 through OAuth. Read and post tweets, query users, and fetch engagement — powered by Nango Connector Gateway.

Documentation

X (Twitter) Connector

Access the X (Twitter) API v2 through OAuth. Read and post tweets, query users, and fetch engagement.

Pricing

OperationPrice
Successful API call (2xx)$0.001
Failed call (4xx/5xx)Free

Quick Test (curl)

# Get authenticated user
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "twitter", "endpoint": "/2/users/me", "method": "GET"}'

# Post a tweet
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "twitter", "endpoint": "/2/tweets", "method": "POST", "body": {"text": "Hello from SandBase!"}}'

Request Format

POST /v1/run
{
  "model": "twitter",
  "endpoint": "/2/users/me",
  "method": "GET",
  "params": {},
  "headers": {},
  "body": {},
  "retries": 0
}

Common Endpoints

MethodEndpointDescription
GET/2/users/meAuthenticated user info
POST/2/tweetsPost a tweet
GET/2/users/{id}/tweetsList a user's tweets

📖 Full API reference: X API v2 Docs

Technical Specs

SpecValue
AuthOAuth 2.0 (user-level)
ProxyNango (auto token refresh)
ExecutionSync
Rate limitInherits X (Twitter)'s API limits

Try X (Twitter)

Test this model in the Sandbase Playground with your own prompts.

Open in Playground