Google Classroom Create topic returning 403 authentication error

你。 提交于 2021-01-29 12:56:20

问题


I'm developing a php application using Google Classroom.

I have a problem to create a topic for a course: I can view the list of topics, but I can't create one.

This is the error:

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"
  }
}

These are my scopes:

$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,

                         ));

And I have permission:

See Permissions

The user is an administrator, I can create courses but I do not understand why I cannot create topics


回答1:


Topics can only be created by teachers, not by admins

As a workaround, ask to be added as a teacher to the course - this will give you the permissions to create topics.



来源:https://stackoverflow.com/questions/60870551/google-classroom-create-topic-returning-403-authentication-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!