I’m using self-hosted n8n and trying to upload media while creating a post on X (Twitter) using the Free X API v2. However, I’m unable to get it working.
2. Confirmed that my X API key and authentication settings are correct.
3. Attempted to use different endpoints, but media is not being attached to the post.
4. Checked X API documentation—seems like media upload might have restrictions in the Free tier.

I believe this post might be of use to you as it goes straight through the process of uploading media to X. Only downside is that it is in French but visible the steps should be clear
Minute 5.45 (Sets up the OAuth) up until Minute 10.25 where he finishes uploading the image