Ok, after using the shard url it started returning a 400, so then I removed the content type application/json and it worked.
This returns me the URL for the snapshot, after trying to make a GET request to this url it gives me a 404 error again. I don't find any documentation at all about how to get this snapshot or what headers does it expect
The problem seems to be that when you request a snapshot, this snapshot is not inmediately available, you have to wait 5 seconds before being able to download it through a GET request.
So what i did is to wait 5 seconds after requesting the snapshot, then fetching it, and it works
To summarize:
- Request the snapshot to the Shard url
- Do not use content type, there is a bug
- Wait 5 seconds
- Download image