An X API v2 token that can post tweets to your account.
X's API has three tiers: Free (reads your own tweets only), Basic ($200/month, can post), Pro ($5000/month). To post your own content, Basic is what you need. Payment is up front, but once you're through, the OAuth itself takes five minutes.
Unlike everyone else, X charges for API access. Developer signup wants an active X account (at least a few days old), with email verified and a phone number attached.
Choose access level
developer.x.com, sign in, fill out the application form (what you're building, who it's for, how you'll monetize). Free is approved fast; Basic is a separate upgrade with payment.
Next: OAuth 2.0 authorize URL with PKCE, code challenge, callback on localhost:8765, swap code for access token + refresh token. ~4 more clicks. Refresh tokens live until revoked, access tokens expire in 2 hours.