HTTP Request node gives "Maximum number of redirects exceeded" error

Describe the issue/error/question

I am trying to fetch twitter DM attachments from n8n following this official doc: Retrieving media | Docs | Twitter Developer Platform When I send a request to the media_url_https url of the attachment file giving the proper OAuth 1.0A credentials from “Postman”, I successfully get the attachment. But whenever I try to get it using the “HTTP Request” node I get the following error: Maximum number of redirects exceeded . I tried every option from the options of HTTP node, also tried to implement the request from Function node as well, but found no solution yet. Can anyone tell me if I am doing anything wrong here and where it might be? I am really stuck. Thank you in advance.

Information on your n8n setup

  • n8n version: 0.176.0
  • Database you’re using: Heroku PostgreSQL
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Can you please try to set:

Response Format: File		
Options -> Follow GET Redirect: false
Options -> Ignore Response Code: true

and if it works then for you.

Thank you @jan for your response. I have tested it using your given options & it does give me a binary file but when I download or view the file it doesn’t show in proper format. And if I set the Full Response -> true I can see that the response code is 302 found. But to get the proper file format I need 200 ok response.

Looks like the problem was happening from my side. As for the header of the HTTP request I was generating header in a function node and then passing the header as variable inside the HTTP node. While generating the header I was using a different url whereas the url should be the same url of the HTTP request node url, in this case, media_url_https received from the twitter webhook event. After using that url and “GET” method to generate the header value I was able to properly send request and receive response.