API Status code 405 - need help

I am getting: “Raw response for the API
Status code 405
Method Not Allowed”

Until a while ago everything worked and now once it works and once it doesn’t, and this applies to my other APIs as well. I don’t know what this is due to? I could be wrong, but it seems to me that the HTTP Method, Endpoint URL, Headers or Body Format are all correct (it generally worked before). As my application depends a lot on these APIs I would be very grateful for any suggestions. I am additionally sending pictures.

BTW I use external API if that helps.

2023-08-24 (9)

Thank you for any suggestion where the problem may be!

Is there some API docs? Does the API call works in API test services like Postman?

1 Like

Yes there are docs: Message a Chatbot
I don’t know the second question.

Why do you hide the url?
According to the doc, the POST is the correct method. But we don’t see the url, so we don’t know if you are sending the request to the correct endpoint

1 Like

Url seems to be correct. The problem is that this issue appears sometimes. Sometimes I get the proper response and some time later it does not work sending 405 massage. I wonder if this may also depend on the exact prompt I write (because it is trained AI API)?

According to what you say, the problem seem to come from the API Service provider.
A) Server error on their side
B) Return the wrong http error code
If the problem is sometimes there and sometimes not, try to check your JSON encoding. If you have an error, the server normally should return like 400 or 500 (but normally shoul be 400)

1 Like

thank you for your help!

1 Like