JSON input on "tasks" API request is always invalid unless using CURL

We are writing a process in GO to call out to Wrike API for all tasks within a date range on the field "dueDate" (example below). All the curl examples work from the documentation using our example but why is curl the only means for a tool to make these API calls work? Should not any framework capable of making HTTPS requests be able to call to Wrike API?

We are using a standard HTTP client in GO and have also tried this API call in Python and NodeJS. All response's were returned as a 400 error with a response body of " {"errorDescription":"Parameter 'dueDate' value is invalid","error":"invalid_parameter"}"

Example - https://www.wrike.com/api/v4/tasks?sortOrder=Desc&sortField=CreatedDate&status=Active&descendants=true&dueDate={"start":"2022-07-07","end":"2022-22-07"}

I have tried all manors of encoding the JSON on the query string with no success in being accepted for each test performed with the various languages. Any suggestions as to what is the problem to help my requests work?

Side thought. It seems very out of place also to use JSON on the query string as the best practice is to always provide JSON on a POST and not a GET.

Any help is appreciated.

1 comment
Spot On Innovative Approach Stellar Advice

Hi CTI API, thank you for posting. I see that my colleagues from the support team are in touch with you via email. Please let me know if I can help with anything else🙋🏻‍♀️

Cansu Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover

Cansu Wrike Team member Become a Wrike expert with Wrike Discover


Folllowing List for Post: JSON input on "tasks" API request is always invalid unless using CURL
[this list is visible for admins and agents only]

Didn’t find what you were looking for? Write new post