【问题标题】:Google Classroom Create topic returning 403 authentication errorGoogle 课堂创建主题返回 403 身份验证错误
【发布时间】:2020-07-07 06:43:38
【问题描述】:

我正在使用 Google Classroom 开发一个 php 应用程序。

我在为课程创建主题​​时遇到问题:我可以查看主题列表,但无法创建主题列表。

这是错误:

Google_Service_Exception Object
(
    [errors:protected] => Array
        (
            [0] => Array
                (
                    [message] => The caller does not have permission
                    [domain] => global
                    [reason] => forbidden
                )

        )

    [message:protected] => {
  "error": {
    "code": 403,
    "message": "The caller does not have permission",
    "errors": [
      {
        "message": "The caller does not have permission",
        "domain": "global",
        "reason": "forbidden"
      }
    ],
    "status": "PERMISSION_DENIED"
  }
}

这些是我的作用域:

$client->setScopes(array(Google_Service_Classroom::CLASSROOM_COURSES,
                         Google_Service_Classroom::CLASSROOM_ROSTERS,
                         Google_Service_Classroom::CLASSROOM_COURSEWORK_ME,
                         Google_Service_Classroom::CLASSROOM_COURSEWORK_STUDENTS,
                         Google_Service_Classroom::CLASSROOM_TOPICS,
                         Google_Service_Classroom::CLASSROOM_PROFILE_EMAILS,

                         ));

我有权限:

See Permissions

用户是管理员,我可以创建课程但我不明白为什么我不能创建主题

【问题讨论】:

    标签: php google-classroom


    【解决方案1】:

    主题只能由教师创建,不能由管理员创建

    作为一种解决方法,要求将其添加为课程的教师 - 这将授予您创建主题的权限。

    【讨论】:

    • 非常感谢,很有用...!
    猜你喜欢
    • 2019-10-26
    • 1970-01-01
    • 2017-07-06
    • 1970-01-01
    • 2014-10-07
    • 2019-12-07
    • 1970-01-01
    • 2017-10-25
    • 2020-10-15
    相关资源
    最近更新 更多