Hey everyone!
I’m trying to use the Twitter (X) API to post replies via the HTTP Request node instead of the official Twitter node, mainly because I want to route the requests through a mobile proxy.
My goal is to manage multiple Twitter accounts (around 10), all tweeting or replying automatically via one workflow.
The problem is that the official Twitter node does not support proxy configuration, and in the HTTP Request node, I can’t fully replicate the OAuth2 flow, especially the token refresh flow or authorization flow.
Here’s what I tried:
- I set up OAuth2 credentials using
Authorization Code
grant type.- I inserted the token manually into the Authorization header.
- I used a working mobile proxy in the HTTP node (and verified it works).
However, I got an error saying:
“The client is not authorized to request an authorization code using this method.”
My main questions:
- Is it possible to fully replicate the official Twitter node using only the HTTP Request node and OAuth2 credentials?
- Can I somehow inject a proxy into the official Twitter node (e.g. via Docker or system-level networking)?
- What is the best way to rotate accounts or proxies to manage 10+ Twitter accounts in a single workflow without triggering blocks?
If anyone has a working solution or pattern for this, I would be super grateful
Thanks in advance!
Are you using v2 of the Twitter API?
Use Pre-Fetched Bearer Tokens (Not Full OAuth Flow)
Instead of trying to do the full OAuth2 Authorization Code flow inside n8n, manually authorize each account once, grab their access token + refresh token, and just store those tokens in n8n’s credentials or environment variables.
Then use the HTTP Request node with:
Authorization: Bearer <ACCESS_TOKEN>
in the headers- Proxy settings in the HTTP node
This way, you’re skipping the hardest part (redirect-based auth) and still using authenticated requests.
You’ll need to manually refresh the tokens periodically unless you automate refresh via another flow using the
refresh_token
.