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 have not changed, then the user's account hasn't changed and you do not need to sync antything.

https://api.toodledo.com/3/account/get.php?access_token=a1b2c3d4e5f6a1b2c3d4e5f6

curl "https://api.toodledo.com/3/account/get.php?access_token=a1b2c3d4e5f6a1b2c3d4e5f6"

If the lookup was successful a userid will be returned.

{"userid":"a1b2c3d4e5f6","alias":"John","email":"[email protected]","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_note":1280894728,"lastdelete_note":1280898329,"lastedit_list":1280898329,"lastedit_outline":1280898329}

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

http://api.toodledo.com/3/account/get.php?access_token=a1b2c3d4e5f6a1b2c3d4e5f6&f=xml

<account>
<userid>a1b2c3d4e5f6</userid>
<alias>John</alias>
<pro>0</pro>
<email>[email protected]</email>
<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_note>1280894728</lastedit_note>
<lastdelete_note>1280894728</lastdelete_note>
<lastedit_list>1280894728</lastedit_list>
<lastedit_outline>1280894728</lastedit_outline>
</account>

The values returned have the following definitions:

  • userid : A unique string that identifies the user. You will need to store this and compare when a user re-authenticates their account to make sure you are syncing with the same account.
  • alias : The user's display name on the website.
  • email : The user's login email address.
  • pro : Whether or not the user is a Silver or Gold Subscriber. You need to know this if you want to use subtasks. A value of 0 means a free account. 1 means Silver and 2 means Gold or higher.
  • dateformat : The user's prefered format for representing dates. (0=M D, Y, 1=M/D/Y, 2=D/M/Y, 3=Y-M-D)
  • timezone : The number of half hours that the user's timezone is offset from the server's timezone. A value of -4 means that the user's timezone is 2 hours earlier than the server's timezone. The server is in the Eastern Standard Timezone.
  • hidemonths : If the task is due this many months into the future, the user wants them to be hidden.
  • hotlistpriority : The priority value above which tasks should appear on the hotlist.
  • hotlistduedate : The due date lead-time by which tasks should will appear on the hotlist.
  • hotliststar : 0 or 1 if the star contributes to the hotlist.
  • hotliststatus : 0 or 1 if the status contributes to the hotlist.
  • showtabnums : The user's preference for viewing counters showing the number of tasks in each section.
  • lastedit_task : A timestamp that indicates the last time that any task was added or edited on this account. You can quickly check this field to determine if you need to download updates.
  • lastdelete_task : A timestamp that indicates the last time that any task was deleted from this account. You can quickly check this field to determine if you need to identify and remove tasks from your application.
  • lastedit_folder : A timestamp that indicates the last time that a folder was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached folder list.
  • lastedit_context : A timestamp that indicates the last time that a context was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached context list.
  • lastedit_goal : A timestamp that indicates the last time that a goal was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached goal list.
  • lastedit_location : A timestamp that indicates the last time that a location was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached location list.
  • lastedit_note : A timestamp that indicates the last time that any note was added or edited on this account. You can quickly check this field to determine if you need to download updates.
  • lastdelete_note : A timestamp that indicates the last time that any note was deleted from this account. You can quickly check this field to determine if you need to identify and remove notes from your application.
  • lastedit_list : A timestamp that indicates the last time that any list was edited on this account. You can quickly check this field to determine if you need to sync lists.
  • lastedit_outline : A timestamp that indicates the last time that any outline was edited on this account. You can quickly check this field to determine if you need to sync outlines.

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.

  • 1 : No access token was given. Read More...
  • 2 : The access token was invalid.
  • 3 : Too many API requests. Read More...
  • 4 : The API is offline for maintenance.

Examples:
JSON:
{"errorCode":1,"errorDesc":"No access token"}

XML:
<error id="1">No access token</error>