Removing Tasks Permissions Problem

Feb 1, 2011 at 6:24 PM
Edited Feb 1, 2011 at 6:26 PM

Hi, I'm trying to remove tasks using my program. I've already logged in and downloaded the tasks list, but when I later try to remove one I get the following exception: [IronCow.RtmException] = {"User not logged in / Insufficient permissions"}

 

I'm removing tasks using this code (rtm is my logged in RTM object, myTask is the task I'm looking to delete)

 

TaskListCollection tlc = rtm.TaskLists;

foreach (TaskList list in tlc)
{
    TaskListTaskCollection taskListsTasks = list.Tasks;
    foreach (Task task in taskListTasks)
    {
        if (!(task.IsDeleted || task.IsCompleted) && task.Name == myTask.Name)
        {
            list.Tasks.Remove(task);
        }
    }
}

 

Coordinator
Feb 1, 2011 at 11:14 PM

Can you log in to RTM's website and check that, in Settings > Services, your application shows up as having permission to delete tasks?

Feb 2, 2011 at 12:14 AM
Edited Feb 2, 2011 at 12:18 AM

Well that's embarrassing, my service doesn't have modify or delete permissions. Do I have to contact RememberTheMilk to get this changed or can I get my program to request the permission from the user?

 

EDIT: I'm an idiot again, of course it's doable. It works now

Coordinator
Feb 2, 2011 at 12:26 AM

He he no worries :)