If you are trying to use the Todoist (www.todoist.com) API

  • And you find that your URL works from a web browser (Internet Explorer, Safari, Firefox)
  • But it doesn't work via wget or curl
  • And you're getting "500 Internal Server Error" in your response
  • And some URIs work via wget (e.g. http://todoist.com/API/getProjects?token=fb5f22601ec566e48083213f7573e908a7a272e5 )
  • But other URIs fail via wget (e.g. http://todoist.com/API/getProject?project_id=22073&token=fb5f22601ec566e48083213f7573e908a7a272e5 )

before you blame the Todoist API -- remember that the ampersand must be escaped on the wget/curl command-line.

wget http://todoist.com/API/getProject?project_id=22073\&token=fb5f22601ec566e48083213f7573e908a7a272e5

(I figured this out by using the Fiddler2 debugging proxy. Great tool.)