ForumsSearch



Search results for "Posted by dave"
Author Message
dave

Score: 0
  • dave
  • Posted: Apr 23, 2012
  • Score: 0
I am the developer of gSyncit and would like to know what the conditions are that would cause a "100 Error" when inserting a new context.

The error message "Error 100" is returned as a result of inserting a new context which fails. In your Toodledo service code what are the conditions that trigger a 100 Error?

You have directed the user to ask us to help with this issue but we would like to know what condition causes this error in the first place so it can be addressed.
dave

Posted Jun 15, 2011 in: How to POST for 'adding tasks'?
Score: 1
  • dave
  • Posted: Jun 15, 2011
  • Score: 1
The post request was in unicode instead of utf-8. Now everything works properly.
dave

Posted Jun 06, 2011 in: How to POST for 'adding tasks'?
Score: -1
  • dave
  • Posted: Jun 06, 2011
  • Score: -1
I still cannot get posts to work. I'm sure I'm going something dumb but I cannot figure out what it is.

Here is a sample RAW POST request and response pulled from fiddler ... I realize the tasks are missing but this is to try to isolate my issue to just getting the key to validate. I am sending the key so why is the error "Empty Key" being returned?



POST http://api.toodledo.com/2/tasks/add.php HTTP/1.1
Host: api.toodledo.com
Content-Length: 36

key=2f0ff8645ef10826b60658b3d23fb012



HTTP/1.1 200 OK
Date: Tue, 07 Jun 2011 03:44:44 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 39
Content-Type: text/html; charset=UTF-8

{"errorCode":1,"errorDesc":"Empty key"}
dave

Posted May 28, 2011 in: How to POST for 'adding tasks'?
Score: 1
  • dave
  • Posted: May 28, 2011
  • Score: 1
There needs to be better documentation for posting requests. I also cannot get posts to work at all. GET calls work just fine but post requests keep returning invalid key responses.

If I post a request to https://api.toodledo.com/2/tasks/edit.php with the POST payload shown below I get invalid key which does not make any sense based on what's discussed here.

I've replaced the ";" with "&" as the delimeter and that did not help. I'm also using the .net WebClient class which makes posting a request trivial. All combined post requests are still failing.

Here's the basic post code ...

var url = "http://api.toodledo.com/2/tasks/edit.php";
var bytes = Encoding.Default.GetBytes(postData);
using (var client = new WebClient())
{
client.Headers.Add("Content-Type", "application/json");
var response = client.UploadData(url, "POST", bytes);
Console.Write(Encoding.Default.GetString(response));
}

GET requests work perfectly. I can include the tassk, key, fields and response format. If I take the "payload" and switch it to a post nothing works.

Here's a sample request which I've tried both encoded and raw and I always get back "{"errorCode":1,"errorDesc":"Empty key"}". I also tried just posting "key=09c98d1b441ceb81bdae09191f9bb9d" and I still get back an invalid key message when the key is valid (swithcing to a get works just fine!)

key=09c98d1b441ceb81bdae09191f9bb9d&tasks=[{"id":"72985498","title":"test12345","context":"0","goal" :"0","location":"0","priority":"1","status":"0","star":"0","remind":"0","starttime":"0","duetime":"0 ","duedatemod":"0","repeat":"","tag":"","note":"Test1","parent":"0","meta":"","modified":"1306583509 ","order":"0","children":"0","repeatfrom":"0","length":"0","timer":"0","timeron":"0","added":"130658 4000"}]&fields=folder,context,goal,location,tag,startdate,duedate,duedatemod,starttime,duetime,remin d,repeat,status,star,priority,length,timer,added,note,parent,children,order,meta&f=xml