That should come with a error message text to describe the issue.
The HTTP code on it’s on will not help
Assuming this is what you sent, other than switching to -X I don’t see anything wrong here.
Unless you just copy/pasted the documentation examp,e and your redirect_uri is not exactly http://localhost:3000