1
Create a new app
Head over the Twitter developers page and create a new app.
Click to sign-up for a new free account

2
Edit application settings
Click to edit the application settings

3
Set up authentication flow
Click to set up an authentication flow

- In the App Permission set it to
Read and Write - In the Type of App set it to
Native App - In the App Info set the
Callback URI / Redirect URL
4
Configure OAuth2 Redirect URI
Your X OAuth2 Redirect URI:
- Production:
https://postqueen.example.com/integrations/social/x - Local development:
http://localhost:4200/integrations/social/x - Docker:
http://localhost:4007/integrations/social/x - If X requires HTTPS for localhost:
https://redirectmeto.com/http://localhost:4200/integrations/social/x
5
Copy your API keys
Save it and go to “Keys and Tokens” tab.Click on “Regenerate” inside “Consumer Keys” and copy the
API Key and API Key Secret.Open .env file and add the following:6
Restart and add the X channel
Optional environment variables
X_URL: override the base used to build the X OAuth callback, which becomes<X_URL>/integrations/social/x. Defaults toFRONTEND_URL. It does not change which X API PostQueen talks to, and setting it to anything your registered callback does not match will break the connect.DISABLE_X_ANALYTICS=true: skip the analytics fetch on the X channel page. Useful if your X plan does not include analytics access and the failed call is noisy.STRIP_LINKS_FROM_X_POSTS=true: automatically remove URLs from post text before publishing. Some accounts see better reach with no links; this enforces it globally.
Next steps
What she can post to X
Limits, post types and settings
Configuration reference
Every variable she reads
Connect errors
Invalid state, invalid_grant and the rest
Another channel
Every network, and what each one asks for