Developer's API Documentation : Account Info


Account Information

The first thing you should do each time you sync with Toodledo is to request the user's account information. This is done via a GET or POST request to the "get.php" API endpoint. This will give you useful information about the user, including various timestamps that you can use to determine if any further action is necessary. If the timestamps havne changed, then the user's account hasn't changed and you do not need to sync antything.

http://api.toodledo.com/2/account/get.php?key=a1b2c3d4e5f6a1b2c3d4e5f6

If the lookup was successful a userid will be returned.

JSON: 
{"userid":"a1b2c3d4e5f6","alias":"John","pro":"0","dateformat":"0","timezone":"-6",
"hidemonths":"2","hotlistpriority":"3","hotlistduedate":"2","showtabnums":"1",
"lastedit_folder":"1281457337","lastedit_context":"1281457997","lastedit_goal":"1280441959",
"lastedit_location":"1280441959","lastedit_task":"1281458832","lastdelete_task":"1280898329",
"lastedit_notebook":"1280894728","lastdelete_notebook":"1280898329"}

You can also specify xml as the output format for any API calls.

http://api.toodledo.com/2/account/get.php?key=a1b2c3d4e5f6a1b2c3d4e5f6;f=xml

XML: 
<account>
<userid>a1b2c3d4e5f6</userid>
<alias>John</alias>
<pro>0</pro>
<dateformat>0</dateformat>
<timezone>-6</timezone>
<hidemonths>2</hidemonths>
<hotlistpriority>3</hotlistpriority>
<hotlistduedate>2</hotlistduedate>
<showtabnums>1</showtabnums>
<lastedit_folder>1281457337</lastedit_folder>
<lastedit_context>1281457997</lastedit_context>
<lastedit_goal>1280441959</lastedit_goal>
<lastedit_location>1280441959</lastedit_location>
<lastedit_task>1281458832</lastedit_task>
<lastdelete_task>1280898329</lastdelete_task>
<lastedit_notebook>1280894728</lastedit_notebook>
<lastdelete_notebook>1280894728</lastdelete_notebook>
</account>

The values returned have the following definitions:




Error Codes

Any of the API calls can return error messages. Here is a list of the error messages that you may receive from the account API.



Examples:
JSON:
{"errorCode":1,"errorDesc":"Empty key"}

XML:
<error id="1">Empty key</error>
Toodledo.com | API Home | Forums | Contact Us | News | Privacy | Terms | Copyright © 2006-2011  1