X/Twitter OAuth1 needed to post images with the X API

Hi Sarah

I managed to post to X with image (single image only). I’m still struggling with videos, and that INIT > APPEND > FINALIZE method.

However, I’m facing an issue with authentication and scopes, that you can check here:

In order to upload image, I’m using HTTP request node and a generic OAuth2 credential.

Set grant type = PKCE
Authorization URL = https://x.com/i/oauth2/authorize
Access Token URL = https://api.x.com/2/oauth2/token
Scope = media.write offline.access

So, here is where i’m having issues. When I use media.write, I can’t use together with tweet.write. So I have to set up another credential (predefined X OAuth2) to post the tweet. You just have to carry the media_id. I’m using two workflows, one to upload image, and another to post the tweet with media_id. Still trying to figure out this issue.

Check this link to find the “Upload image” node. Just set the credential as described above, and chage the URL to https://api.x.com/2/media/upload

This way is working for me, but I’m still trying to solve the scopes / authentication issue.

Hope that helps!