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
| Operation | Price |
|---|---|
| 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
| Method | Endpoint | Description |
|---|---|---|
| GET | /2/users/me | Authenticated user info |
| POST | /2/tweets | Post a tweet |
| GET | /2/users/{id}/tweets | List a user's tweets |
📖 Full API reference: X API v2 Docs
Technical Specs
| Spec | Value |
|---|---|
| Auth | OAuth 2.0 (user-level) |
| Proxy | Nango (auto token refresh) |
| Execution | Sync |
| Rate limit | Inherits X (Twitter)'s API limits |
Try X (Twitter)
Test this model in the Sandbase Playground with your own prompts.
Open in Playground