X API Access 2026: Console, OAuth 2.0 PKCE and Scopes Hub
X API access works differently in 2026 than most older guides describe. There is no longer a ladder of monthly plans to apply for. X’s own docs now say the X API uses pay-per-usage pricing: you sign up in the Developer Console, create an app, buy credits and pay for what you use. That makes the technical setup the hard part: the right app type, OAuth 2.0 with PKCE, exact callback URLs and the right scopes. This hub covers all of it from X’s developer documentation, and links to our deeper X API guides. The one part that is still reviewed by X, the Ads API, has its own guide: X Ads API access.
How X API Access Works Now
X’s About the X API page lists three steps for v2, which X calls “Recommended”:
- “Sign up at console.x.com”
- “Create an app and get credentials”
- “Make your first request”
On billing, X’s pricing page says: “The X API uses pay-per-usage pricing. No subscriptions—pay only for what you use.” Credits are bought upfront: “Purchase credits upfront in the Developer Console. Credits are deducted as you make API requests.” X also warns: “Add credits before your balance reaches zero to ensure uninterrupted API access.” We do not quote per-request prices here because they can change. Check the live pricing page before you budget. For teams moving off old plans, see our X API Legacy Pro cutover guide.
Step 1: Create the App and Describe the Use Case
X’s Apps documentation says to open console.x.com, click Create App, and “Enter a name, description, and use case for your app.” Write the use case the way the app really works: who uses it, what it reads, what it posts, and whether it sends DMs. Keep it consistent with the scopes you request later. X’s own best practice list includes “Request only the permissions your app actually needs.”
X also suggests you “Create different apps for development, staging, and production.” And: “Save credentials immediately—they’re only shown once.”
Step 2: Choose Credentials and App Type
| Credential | X’s use case |
|---|---|
| API Key & Secret | “Authenticate with OAuth 1.0a. Used to sign requests or generate user tokens.” |
| Access Token & Secret | “Make requests on behalf of your own account (OAuth 1.0a).” |
| Client ID & Secret | “Authenticate with OAuth 2.0. Used for authorization code flow.” |
| Bearer Token | “App-only authentication for public data endpoints.” |
X’s advice: “Choose OAuth 2.0 for new projects. It offers fine-grained scopes and is required for X API v2 user-context endpoints.” For OAuth 2.0 you pick an app type: Web App, Automated App / Bot, Native App or Single Page App. X explains: “Confidential clients receive a Client Secret. Public clients use PKCE only.” A SaaS dashboard is normally a Web App.

Step 3: Set Callback URLs Exactly
Many failed X API access setups break here. X’s rules:
- “URLs must match exactly (including trailing slashes)”
- “Maximum of 10 callback URLs per app”
- “Use https:// in production”
- “For local development, use http://127.0.0.1 (not localhost)”
Step 4: OAuth 2.0 PKCE Scopes for a Scheduler or SaaS
X’s OAuth 2.0 Authorization Code Flow with PKCE reference lists the scopes. The ones a typical posting tool needs:
| Scope | X’s description |
|---|---|
tweet.read | “All the Tweets you can view, including Tweets from protected accounts.” |
tweet.write | “Tweet and Retweet for you.” |
users.read | “Any account you can view, including protected accounts.” |
media.write | “Upload media.” |
offline.access | “Stay connected to your account until you revoke access.” |
dm.read / dm.write | Read, and “Send and manage Direct Messages for you.” |
Two timing rules catch many teams. First: “By default, the access token you create through the Authorization Code Flow with PKCE will only stay valid for two hours unless you’ve used the offline.access scope.” Without offline.access, X says “we will not generate a refresh token”, so scheduled posts fail later. Second, the authorization code must be exchanged for a token “within 30 seconds”. DM apps should read our X API DM scopes guide, and video posting tools our chunked media upload guide.
OAuth 1.0a Permission Levels
If you still use OAuth 1.0a, X has three levels: Read only, Read and write, and Read, write, and DMs. Only the last can “Send and read Direct Messages”. X notes: “Changing permissions requires users to re-authorize your app to get new tokens with the updated scope.” If you upgrade an app from read to write, every connected user must reconnect.
X API Access Checklist for a SaaS Integration
- Separate apps for development, staging and production, as X recommends.
- OAuth 2.0 Web App type, with the Client Secret stored on the server only.
- Every callback URL added exactly as your code sends it, trailing slash included.
- Only the scopes your features use, plus
offline.accessfor anything scheduled. - A refresh job that runs before the two-hour access token expires.
- Credit balance monitoring, so the integration does not stop when credits run out.
- A reconnect prompt for users whenever you add a new scope or permission level.
Where X Still Reviews Your Application
Basic X API access does not end with your app. X’s Ads API step-by-step guide says: “At this point you will have basic access to the X API, but not specific X Ads API functionality. Next, you will need to request access and be approved for Ads API access.” Bots also have rules of their own; see our automated account label guide.
For items that X reviews, this is our own estimate from past projects (X does not publish a review time): New app: about 3 days for our complete preparation and submission. If the app was already applied or rejected before, submission can happen the same day. Then X’s review takes 10–20 days (less or more).
X API Access FAQ
How do I get X API access in 2026?
X’s docs say to sign up at console.x.com, create an app and get credentials, then make your first request. The X API uses pay-per-usage pricing with credits bought in the Developer Console.
Is there still a Twitter developer account approval?
X’s current getting-started steps do not describe a separate approval for basic X API v2 access. The Ads API is different: X says you must request access and be approved for Ads API access.
Which X API OAuth 2.0 scopes does a scheduler need?
Usually tweet.read, tweet.write, users.read, media.write for images and video, and offline.access so the app receives a refresh token. Without offline.access, X says the access token stays valid for only two hours.
Why does my X OAuth callback fail?
X requires callback URLs to match exactly, including trailing slashes. Use https in production and http://127.0.0.1, not localhost, for local development. An app can have at most 10 callback URLs.
Do users need to reconnect after I add write permissions?
Yes. X says changing permissions requires users to re-authorize your app to get new tokens with the updated scope.
Is there a refund if an X review is not approved?
Yes, we work on a 100% approval or 100% refund basis. If any permission is not approved, you get a refund for that permission.
If your X API access setup or OAuth flow is failing, run the checklist above first, then read our guides on X API Direct Messages scopes and chunked media upload.
Written by Amandeep Singh, API approval specialist. 10+ years experience.