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.

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
4 Kommentare
Avatar
Cansu

Hi Meetings CTI IT, 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🙋🏻‍♀️

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

We're using python requests module and a request send with data provided in params= argument is working.

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Esko Viranko, hi, could you contact me how you did it? I am also using python to extract data from Wrike, but cannot get it working. Thanks. 

 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

You can send a email esko@smartium.fi.

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

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]

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