405 Method not allowed


I am testing an API using the POST method, it shows the status as “405 Method Not Allowed”. But, when I change the method to Get, it works fine (status becomes 200 ok). Also, the parameters I am providing in the request body are already tested on a different platform. Request if you could please help me with this error.
Thank you

Hey @azadharsana

Welcome to the community! :trophy:

Do you have any documentarion for the endpoints / API you’re using?

Do you know that the URL that works with a GET request, has a POST method implemented?

You mentioned that this has already been tested on a different platform, could you expand on that please?

Hi @azadharsana,

As @dannydainton mentioned, to best troubleshoot, please provide some documentation around the API you are using.

However, in general, following HTTP standards, a 405 response status code means “Method Not Allowed”. So literally, a POST method is not allowed for that url endpoint on the server, in question. The server explicitly denies a POST method to that endpoint.

Likely, its been implemented using a GET request, since you were able to see success there.

Could you elaborate more on what you are trying to do, is there a reason you need a POST request? If you are certain you need a POST request, chances are, you’re just using the wrong endpoint on the server.

Again, this can only be solved if you have proper documentation to show what methods are supported for each endpoint.