Skip to main content
X is a bit different. They created an oAuth2 flow, but it works only with Twitter v2 API. But in order to upload pictures to X, you need to use the old Twitter v1 API. So you are going to use the normal oAuth1 flow for that (that supports Twitter v2 also 🤷🏻‍).
1

Create a new app

Head over the Twitter developers page and create a new app. Click to sign-up for a new free accountX
2

Edit application settings

Click to edit the application settingsX
3

Set up authentication flow

Click to set up an authentication flowX
  • 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
You must select Native App for OAuth 1.0a to work correctly. Selecting Web App, Automated App or Bot will cause authentication to fail with error code 32.
4

Configure OAuth2 Redirect URI

Your X OAuth2 Redirect URI:
  • Production: https://your-postiz-domain.com/integrations/social/x
  • Local development: http://localhost:4200/integrations/social/x
  • Docker: http://localhost:5000/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:
X_API_KEY=""
X_API_SECRET=""