Setting id to task using Google Task API returns 400 invalid value

自古美人都是妖i 提交于 2019-12-25 08:59:43

问题


I am using Google's Java API for an project.

Strangely, inserting a task without setting an id works fine. However, inserting a task with a id returns a 400 invalid value error. The id is to be used for syncing local data with Google Tasks

I'm pretty sure there's nothing wrong with the algorithm that generates the ids for the task. The same algorithm works perfectly for Google Calendar API.

Am I missing something here?


回答1:


You may refer with this SO answer. It suggested to pass the id key/value pair together with the title information you are already sending. There's no documentation to indicate this is a required parameter, especially since it is included in the URL. Google requires the id of the task to be passed as a part of url, parameters and body.



来源:https://stackoverflow.com/questions/43172432/setting-id-to-task-using-google-task-api-returns-400-invalid-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!