Most people use software like Postman to test their REST APIs. Postman is user-friendly and does the job well.
However, in some situations, Postman doesn't provide enough info to locate the issue and in this case we recommend using a command line utility CURL.
A common mistake - some people use redirect to another page in AfterSuccessfulLogin event, forgetting that it will break REST API flow. In this case Postman will simply return "File not found" error. Running CURL in the command line add -v parameter that will provide a detailed output.
And to avoid this kind of issue, use isInRestApi() function that will tell you if we execute our code the "normal" way or are in the middle of REST API call. You should only perform this kind of redirect in case of a regular execution.