I also ran into the same problem, the server redirects to another link when I got to the base link, I resolved it by getting the link to the redirect server, and then hit that URL to access all the other web APIs.
To get a redirect link:
String redirectUrl=responseHeaders.get("location");
Note. In volley, we can use a retry policy because we get this code 307 and can try again in place (redirect the URL).
If anyone has other best solutions to this problem, please let me know ..
source share