0

I have a Google sheet that imports and updates tasks from one of my Google tasks list. Some of the tasks need to be completed by users of other accounts with shared access to the sheet.

The code works fine when run from my account. But it fails when run from another account because it can't find the task. I have shared my calendar with the other users but this does not help.

The code in question is as follows:

var tasklistID="mytasklistid";
var listoftasks = Tasks.Tasks.list(tasklistID);

I get the following error when running from another user's account:-

Execution failed: API call to tasks.tasks.list failed with error: Not Found.

How do I enable the other users to access my tasklist?

Cooper
  • 59,616
  • 6
  • 23
  • 54
Sheils
  • 323
  • 2
  • 22
  • 1
    Is this a bound script? If so, the script will always execute as the user at the keyboard and the API will try to get their task list, not yours. See https://developers.google.com/apps-script/guides/services/authorization – dwmorrin Apr 22 '19 at 00:28
  • @dwmorrin yes it is a bounded script. I now understand that this is why it is not working. If I copy all the codes into an unbounded script, will I be able to use it from the sheet? – Sheils Apr 22 '19 at 03:06
  • Standalone scripts can open and edit your spreadsheets, and you can have multiple scripts opening and editing the same spreadsheet. If you get stuck, edit the question above and show us more details on how you are using the sheet, what the users need to do, etc. – dwmorrin Apr 22 '19 at 03:20
  • @dwmorrin OK I will have a go at converting the sheet to work with a standalone script. If I get stuck I will post as a separate question. Cheers – Sheils Apr 22 '19 at 03:36

0 Answers0