Google apps script 列出Google课堂主题时出现身份验证范围不足错误

Google apps script 列出Google课堂主题时出现身份验证范围不足错误,google-apps-script,google-classroom,Google Apps Script,Google Classroom,试着通过以下例子来学习操纵课堂 获取错误: **GoogleJsonResponseException: API call to classroom.courses.topics.list failed with error: Request had insufficient authentication scopes.** at getTopics(getTopics:12:43) at testGetTopics(getTopics:22:15) 我的清单文件: { "ti

试着通过以下例子来学习操纵课堂

获取错误:

 **GoogleJsonResponseException: API call to classroom.courses.topics.list failed with error: Request had insufficient authentication scopes.**
at getTopics(getTopics:12:43)
at testGetTopics(getTopics:22:15)
我的清单文件:

{
  "timeZone": "America/Mexico_City",
  "dependencies": {
    "enabledAdvancedServices": [{
      "userSymbol": "Classroom",
      "serviceId": "classroom",
      "version": "v1"
    }, {
      "userSymbol": "Sheets",
      "serviceId": "sheets",
      "version": "v4"
    }]
  },
  "exceptionLogging": "STACKDRIVER",
  "oauthScopes": [
  "https://www.googleapis.com/auth/spreadsheets"
  , "https://www.googleapis.com/auth/script.container.ui"
  , "https://www.googleapis.com/auth/classroom.courses"
  , "https://www.googleapis.com/auth/classroom.courses.readonly"
  , "https://www.googleapis.com/auth/classroom.guardianlinks.students"
  , "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly"
  , "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly"
  , "https://www.googleapis.com/auth/classroom.rosters"
  , "https://www.googleapis.com/auth/classroom.rosters.readonly"
  , "https://www.googleapis.com/auth/classroom.profile.emails"
  , "https://www.googleapis.com/auth/classroom.profile.photos"
  , "https://www.googleapis.com/auth/classroom.coursework.me"
  , "https://www.googleapis.com/auth/classroom.coursework.me.readonly"
  , "https://www.googleapis.com/auth/classroom.coursework.students"
  , "https://www.googleapis.com/auth/classroom.coursework.students.readonly"
  , "https://www.googleapis.com/auth/classroom.announcements"
  , "https://www.googleapis.com/auth/classroom.announcements.readonly"
  , "https://www.googleapis.com/auth/classroom.push-notifications"],
  "runtimeVersion": "V8"
}
我已经为电子表格和教室启用了高级API。我已取消启用并重新启用强制重新授权


其他stackflow提到此错误时引用了“凭据”文件和“pickle”。我在myDrive上找不到任何包含“凭据”的内容。其他的程序员在使用Python之类的东西。我在他们的编辑器中使用vanilla Google Apps脚本,并在他们的服务器上执行。

courses.topics.get()需要ttps://www.googleapis.com/auth/classroom.topics.readonly. 我在你的名单上没有看到。谢谢,这很有效。截止到今天,文档中没有列出它。我决不会想到自己写一篇文章!
{
  "timeZone": "America/Mexico_City",
  "dependencies": {
    "enabledAdvancedServices": [{
      "userSymbol": "Classroom",
      "serviceId": "classroom",
      "version": "v1"
    }, {
      "userSymbol": "Sheets",
      "serviceId": "sheets",
      "version": "v4"
    }]
  },
  "exceptionLogging": "STACKDRIVER",
  "oauthScopes": [
  "https://www.googleapis.com/auth/spreadsheets"
  , "https://www.googleapis.com/auth/script.container.ui"
  , "https://www.googleapis.com/auth/classroom.courses"
  , "https://www.googleapis.com/auth/classroom.courses.readonly"
  , "https://www.googleapis.com/auth/classroom.guardianlinks.students"
  , "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly"
  , "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly"
  , "https://www.googleapis.com/auth/classroom.rosters"
  , "https://www.googleapis.com/auth/classroom.rosters.readonly"
  , "https://www.googleapis.com/auth/classroom.profile.emails"
  , "https://www.googleapis.com/auth/classroom.profile.photos"
  , "https://www.googleapis.com/auth/classroom.coursework.me"
  , "https://www.googleapis.com/auth/classroom.coursework.me.readonly"
  , "https://www.googleapis.com/auth/classroom.coursework.students"
  , "https://www.googleapis.com/auth/classroom.coursework.students.readonly"
  , "https://www.googleapis.com/auth/classroom.announcements"
  , "https://www.googleapis.com/auth/classroom.announcements.readonly"
  , "https://www.googleapis.com/auth/classroom.push-notifications"],
  "runtimeVersion": "V8"
}