Web API POST returning "Method not provided"Answered

Any ideas why this POST request:

https://wyday.com/limelm/api/rest/?api_key=MY_KEY_WAS_HERE&method=limelm.prod.getAll

is returning:

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="fail">
    <err code="101" msg="Method not provided."/>
</rsp>

I tried with other methods too.

Many thanks in advance

That’s a GET request not a POST request. See the docs and our examples.

I've tried from Postman in VSCode with the request type set to POST but I get that response.
I also tried via js fetch api also set to POST but got the same response.

Answer

You’re POSTing a GET request.

Remove everything after the final slash in the URL and actually POST the parameters.

Here’s an example in Python: https://wyday.com/limelm/help/api/misc.overview/#example

Post code if you need help.

, edited 👍 1

Thank you! That pointed me in the direction I needed