Developer's API Documentation : Collaboration
Overview
Toodledo provides several different ways to share tasks with collaborators. Please review our sharing documentation for an overview of the concepts.
Fetching Collaborators
To use Toodledo's collaboration tool, you first need a list of the user's collaborators. This is done via a GET or POST request to the "account/collaborators.php" API endpoint. This will give you useful information about the people that your user has permission to collaborate with.
http://api.toodledo.com/2/account/collaborators.php?key=a1b2c3d4e5f6a1b2c3d4e5f6
If the lookup was successful list of records will be returned.
JSON: [{"id":"1234abc","name":"Bob","reassignable":0,"sharable":1},{"id":"5678xyz","name":"Jane","reassignable":1,"sharable":0}]
You can also specify xml as the output format for any API calls.
http://api.toodledo.com/2/account/collaborators.php?key=a1b2c3d4e5f6a1b2c3d4e5f6;f=xml
XML: <users> <user> <id>1234abc</id> <name>Bob</name> <reassignable>0</reassignable> <sharable>1</sharable> </user> <user> <id>5678xyz</id> <name>Jane</name> <reassignable>1</reassignable> <sharable>0</sharable> </user> </users>
The values returned have the following definitions:
- id : The user id of the person.
- name : The name of the person.
- reassignable : A boolean (0 or 1) if this user can be reassigned a task.
- sharable : A boolean (0 or 1) if this user can have jointly shared tasks.
Sharing Tasks
There are currently two ways to collaborate via the API. You can reassign a task to someone else by using the tasks/reassign.php call. This will move the task from one account to another. The other way to collaborate via the API is with jointly shared tasks. The owner of a task can choose to share it with their collaborators. The task will appear on everyone's list and be editable by anyone. You create a jointly shared task via the tasks/share.php call. Please see the Tasks API documentation for more information.
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 : You did not specify a key for authentication.
- 2 : The authentication key that you provided has expired or is invalid.
- 100 : Unknown Error.
- 500 : The Toodledo server is offline for maintenance.
Examples:
JSON: {"errorCode":1,"errorDesc":"Empty key"}
XML: <error id="1">Empty key</error>