Warning: Never share your X (formerly Twitter) API keys or access tokens with anyone — including Aimkt developers.
These keys are for your personal use only and must be kept secure in your private environment.
Full control of your API access at all times.
Watch the YouTube Tutorial: https://m.youtube.com/watch?si=swqzAXiSTFOXZiFo&v=3WneMPnOu88&feature=youtu.be
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 🤷🏻).
Head over the Twitter developers page and create a new app.
Click to sign-up for a new free account

Click to edit the application settings

The 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 Web App, Automated App or Bot
In the App Info set the Callback URI / Redirect URL.
The OAuth2 Redirect URI is the location where the provider will redirect to after trying to login. This needs to set to your Aimkt aimkt.xyz + /integrations/social/ + x.
- eg: If you are running on a container, and your Aimkt URL is:
https://aimkt.xyz, then your OAuth2 Redirect URI ishttps://aimkt.xyz/integrations/social/x - eg: If you are running on localhost, and your Aimkt URL is
http://localhost:4200, then your OAuth2 Redirect URI ishttp://localhost:4200/integrations/social/x - eg: If you are running on localhost, and the provider doesn't accept http uris, and your Aimkt URL is
http://localhost:4200, then your OAuth2 Redirect URI ishttps://redirectmeto.com/http://localhost:4200/integrations/social/x
You only need to set one OAuth2 Redirect URI when you are setting up your Aimkt app.
Save it and go to “Keys and Tokens” tab
Click on “Regenerate” inside “Consumer Keys” and copy the API Key and API Key Secret.
Go to setting https://aimkt.xyz/settings => Click tab “Social API Keys” => Click button ”+ Add New”

X_API_KEY=""
X_API_SECRET=""