Creates posts on X (Twitter) as the account whose credentials you send: an X developer app's API key and secret, and the account's access token and secret, from the X developer portal. The credentials are used for that call only and appear redacted in your request records. Each call makes one post; X bills your developer account at its own rate.
https://api.sfaie.com
Send your key as an Authorization: Bearer token. Each call acts on the account whose credentials it carries, so none is answered from the cache. An identical call acts again, and a request that sends Sfaie-Cache is told no-store.
Where your request goes
The text of your post and your credentials go to X, which publishes the post on the account the credentials belong to. SFAIE uses the credentials for that call only. It keeps the request, with the credentials redacted, and X's reply for 30 days and shows them on your account's Requests page.
Endpoint
x-posts
Creates one post on X as the credentialed account.
Parameters
- auth
- required · OAuth 1.0a user context: the app's key and secret, the account's access token and secret
- text
- required · 1 to 25,000 characters; X applies the account's own limit
Request
curl -X POST https://api.sfaie.com/sfaie/publish/v1/x/posts \
-H "Authorization: Bearer $SFAIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "auth": { "api_key": "YOUR_API_KEY", "api_key_secret": "YOUR_API_KEY_SECRET", "access_token": "YOUR_ACCESS_TOKEN", "access_token_secret": "YOUR_ACCESS_TOKEN_SECRET" }, "text": "Hello from sfaie." }'Response
{
"data": {
"id": "1462305720000000001",
"text": "Hello from sfaie."
}
}Try it
Sign in to try this endpoint.
Calls are real. Accepted calls cost 1 credit.