Skip to content

Instantly share code, notes, and snippets.

@thewindev

thewindev/todoist

Created Oct 20, 2020
Embed
What would you like to do?
Todoist API payload
msg.headers = {};
msg.method = "POST";
msg.url = "https://api.todoist.com/sync/v8/sync";
var taskId = "4271193756";
msg.payload = "token=<insert your token here>&commands=%5B%7B%22type%22%3A%20%22item_update_date_complete%22%2C%20%22uuid%22%3A%20%22" +
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
}) + "%22%2C%20%22args%22%3A%20%7B%22id%22%3A%20" + taskId + "%7D%7D%5D"
msg.headers["content-type"] = "application/x-www-form-urlencoded"
return msg;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.