I would suggest minimizing your code to just the request like I did using Postman, and see if it works. Then you can start debugging your code to find what is negatively influencing it and causing the malformed request.
The endpoint you referenced is just a list endpoint the available stages. There is no filter for opportunity_id. I also checked for that error and it is not returned by the endpoint you linked. Can you double check the endpoint you are calling and maybe provide a sample request you are sending?