SocialOAuth 2.0 with PKCE — Client ID + Client secret (+ app bearer token for listening)Pricing verified 2026-10-06
X (Twitter)
Publish posts with images, read replies and mentions, and monitor keywords for social listening.
AProvider definition
- Provider
- X (Twitter)
- What it does
- Publish posts with images, read replies/mentions, and monitor keywords (social listening).
- Why we need it
- Publish posts with images, read replies and mentions, and monitor keywords for social listening.
- Used in
- Social (publish, replies) · Social listening
- Official site
- https://developer.x.com/en/portal/dashboard
BAccount requirements
- Account type
- X developer account with a Project and App
- Prerequisites
- X account
- Payment method for pay-per-use API credits
CConnection method
- Authentication
- OAuth 2.0 with PKCE — Client ID + Client secret (+ app bearer token for listening)
- Where to enter it
- Your workspace: App → Integrations → Providers & API keysWorkspace owner or admin. Keys added here are used only by your workspace (AI keys here don't use plan credits).
- Per brand: App → Integrations → Connected accountsAnyone who manages the brand. Each brand connects its own accounts.
Setup steps
- 1developer.x.com → create a Project and App.
- 2User authentication settings: OAuth 2.0, type “Web App”, permissions Read and write; add the Callback URI shown below and your website URL.
- 3Copy the OAuth 2.0 Client ID and Client secret (and the Bearer token for listening).
- 4Buy API credits in the developer console.
- 5Enter them in the application and connect your X account.
DPermissions & API scopes
| Scope / permission | Why it's needed | Requested by |
|---|---|---|
| tweet.read | Read your posts and replies. | X connection |
| tweet.write | Publish posts. | X connection |
| users.read | Identify the connected account. | X connection |
| offline.access | Keep the connection without signing in again (refresh token). | X connection |
| media.write | Upload images attached to posts. | X connection |
This list is generated from the scopes the application's code requests.
EFree vs paid
- Free account / free API access
- No — the free tier was discontinued for new developers.
- Card or billing account required?
- Yes — pay-per-use credits.
- Paid plan / costs
- Pay-per-use per post created and per post read (roughly $0.015 per post created, more with links; $0.005 per post read), capped at a monthly read volume before Enterprise.
- Quota and usage limits
- Per-endpoint rate limits; monthly read cap on pay-per-use.
- Production restrictions
- Legacy Basic/Pro subscriptions were migrated to pay-per-use in 2026.
Checked against official/current sources on 2026-10-06. Provider pricing changes often — re-check before publishing.
FSetup screenshots
Capture each step with real values masked. Save images as public/docs/integrations/x/1.png … 10.png and they appear here automatically.
- Screenshot to add1. Account login / creationThe provider's sign-in or sign-up page.
- Screenshot to add2. Developer consoleThe developer console or dashboard home.
- Screenshot to add3. Project / app creationCreating the app or project used for this integration.
- Screenshot to add4. API enablementThe API or product enabled for the project.
- Screenshot to add5. OAuth configurationConsent screen / OAuth settings with the redirect URIs.
- Screenshot to add6. API key / credentials creationCreating the key, secret or token (mask the value).
- Screenshot to add7. Permissions / scopesThe scopes or permissions requested or approved.
- Screenshot to add8. Billing / quota settingsBilling, credits or quota page.
- Screenshot to add9. Application connectionThe provider card in our application with fields filled (secrets masked).
- Screenshot to add10. Successful connectionThe green Test result or the connected account listed.
GApplication configuration
Never include real API keys, client secrets, access tokens or passwords in screenshots, tickets or documentation. Values below are field names and examples only.
| Field | Required | Example / default | Notes |
|---|---|---|---|
| OAuth 2.0 client ID | Yes | — | |
| OAuth 2.0 client secret | Yes | •••••••• | Stored encrypted; shown masked after saving. |
| App bearer token | Optional | •••••••• | Used for social listening (recent search). |
Paste these into the provider's console
- Callback URI
https://api.socialmati.com/api/oauth/x/callback
HTesting
- 1Connect the account and publish a test post.
- 2Social → Listening: add a keyword and check results appear (needs the bearer token).
ITroubleshooting
| Problem | What to do |
|---|---|
| 402 / CreditsDepleted | Add API credits in the developer console. |
| Callback URL not approved | The callback URI must match exactly in User authentication settings. |
| Invalid credentials | Check the Client ID/App ID and secret were copied from the same app, without spaces. Regenerate the secret if unsure. |
| Missing permissions | Reconnect and accept every permission on the consent screen. If a permission is missing from the list, add it to the app (and get it approved). |
| OAuth failure | Sign-in was cancelled, the app is in development/testing mode, or the user isn't allowed to use it yet. Add the user as a tester or publish the app. |
| Redirect URI mismatch | Copy the redirect URI from section G exactly — same https scheme, host and path, no trailing slash — into the provider's app settings. |
| API not enabled | Enable the API/product for the project or app in the provider console and wait a few minutes. |
| Quota exceeded | Wait for the quota window to reset (see section E) or request a higher quota / add credits. |
| Account not eligible | Check the account requirements in section B (e.g. business/professional account, verified property, registered organisation). |
| App review required | Permissions beyond development access need the provider's review before other accounts can connect. See section E for restrictions. |
| Billing required | Add a payment method or prepaid credits on the provider account (see section E). |
JDisconnect & security
- Revoke access at the provider
- x.com → Settings → Security and account access → Apps and sessions → revoke. Regenerate the Client secret in the developer portal.
- Disconnect in the application
- App → Integrations → Providers & API keys or App → Integrations → Connected accounts → open the card → Remove / Disconnect. Connected accounts can be disconnected per brand.
- Rotate credentials
- Create the new key or secret first, paste it into the same card and Test, then delete the old one at the provider — no downtime.
- How credentials are stored
- Encrypted at rest with AES-256-GCM using the server's ENCRYPTION_KEY, shown masked after saving, never returned to the browser, and used only from the API server.
- What data the application can access
- The connected account's posts, replies and mentions; public posts matching listening keywords.
Other Social providers
Facebook / Meta
OAuth 2.0 (Facebook Login) — App ID + App secret
Setup guide Instagram
OAuth 2.0 through the Meta app (Facebook Login)
Setup guide Threads
OAuth 2.0 — Threads app ID + secret
Setup guide LinkedIn
OAuth 2.0 — Client ID + Client secret
Setup guide YouTube
OAuth 2.0 (Google) + optional API key
Setup guide TikTok
OAuth 2.0 — Client key + Client secret
Setup guide 
