Google课堂创建主题返回403身份验证错误

问题描述 投票:0回答:1

我正在使用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个回答
0
投票

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

作为一种解决方法,要求被添加为课程的老师-这将使您具有创建主题的权限。

© www.soinside.com 2019 - 2024. All rights reserved.