Connect X (Twitter)
Last updated
Connecting X lets your Modules read your account's recent posts and the posts that mention you, and publish a text post. You create an app in your own X developer account and paste four values into Raileon. Raileon keeps them encrypted.
You pay X for API use
X charges for its API on a pay-per-use basis. You buy credits in your own X developer console, and X deducts them as requests are made: each post your Modules publish, each post they read, and the test on the Apps page. Raileon does not charge for X and cannot see or top up your X balance. If your credits run out, X refuses the request and the Module tells you. See X's current prices on the X API pricing page.
What your Modules can do
- Read your account's recent posts, with their like, repost and reply counts.
- Read the recent posts that mention your account.
- Publish a plain-text post of up to 280 characters on your account.
Every post waits for your approval, every time. The approval shows the
exact text and the account it will post on (for example @yourbusiness), which
Raileon asks X for rather than taking from the Module. Nothing is public until
you approve.
What your Modules can't do
- Delete posts, send direct messages, follow, unfollow, like, repost or reply.
- Attach images or video, or post polls. Posts are text only.
- Use any account other than the one the access token belongs to.
Posts that mention you are written by other people, so your Modules treat them as information only, never as instructions.
Before you start
You need an X account to post as, and a payment method for X credits.
Create your X app
- Sign in to the X developer console with the account you want to post as, and create an app.
- Add API credits under Billing.
- Open the app's User authentication settings and set App permissions to Read and write. Save.
- Open the Keys and tokens tab. Copy the API Key and API Key Secret.
- Under Access Token and Secret, generate the token for your own account and copy the Access Token and Access Token Secret. Generate them after you set Read and write, otherwise they are read only and posting fails.
Connect X
Open Apps
In your dashboard, go to Apps in the left sidebar and select Connect on the X card.
Paste the four values
Paste the API key, API key secret, access token and access token secret, then select Test connection. Raileon asks X who the token belongs to.
Save
Save. The card then shows Connected.
Disconnect X
Open Apps, find the X card, and select Disconnect. To be thorough, also regenerate or revoke the access token in the X developer console.
If it stops working
If a Module says X rejected the keys, paste them again. X signs a token out when you regenerate it. If it says there are no credits, add credits in the developer console. X also refuses a post that is identical to a recent one.