+ Add Question

API doesn't seem to handle # link anchors


I'm not a developer but I'm playing around with adding a task via the Standard API.

If I include a URL in the "content=" parameter that contains a # anchor character, I get a back a 400 Bad Request.

If I remove the # character from the URL it will add a task correctly, but then I need to manually update the URL with the # within the Todoist web app.

Do I need to escape the # character somehow?

All responses

David Trey  staff
Replied on Dec 04, 2013 - 15:31 UTC

Hello Adam,

Please try to replace the hashtag with %23 within the URL.

In fact, it's recommended to use percent encoding in general when dealing with URLs: http://en.wikipedia.org/wiki/Percent-encoding

Best regards,

Adam Jacobson
Replied on Dec 04, 2013 - 23:21 UTC

Thanks David. That works nicely :-)