fetch where the site employs redirect

I need to use a scheduled script for renewing my ip address with Getflix. The code I’m using is

/tool fetch url=“https://www.getflix.com.au/api/helper/ip-address/unique-secret-login-code-thingy-that-I-cannot-tell-you” dst-path=“/getflix.txt” mode=https

However the code doesn’t work and when I put it manually into the console it returns this error.

status: failed

failure: closing connection: <302 Found> 149.126.74.241:443 (4)

I have discovered a explanation, which is that the ip address 149.126.74.241 contains a redirect and is not the actual location of the website - apparently the fetch command cannot deal with this.

Does anybody have a script or a mechanism for discovering actually where the page resides before then running the routine or any other ideas ??

Fetch it with wget and see where the redirect goes, and use that.

After mucking around with ‘fetch’, the below code is what I use to update my current IP with Getflix:-
/tool fetch mode=https user=replace_this_with_your_API password=x keep-result=no http-method=put url=https://www.getflix.com.au/api/v1/addresses.jsonPutting it here so that no one else coming from Bing and Google has to work hard for this.