How can I get responses from redirections?

Hi @igorrecioh,
welcome to the community forum :tada:

The HTTP JS API supports the redirects param where you can set the maximum number of redirects to follow. You could limit the number of redirects for the first request, get the token then execute the rest of the redirects with a second request.

Here some simplified code for summary:

var response = http.post(<URL>, {redirects: 1})
var token = response.<TOKEN-PATH> 
response = http.post(<CONTINUE-REDIRECT-URL>)
1 Like