Google Classroom API modifyAttachments

后端 未结 3 1895
陌清茗
陌清茗 2020-12-12 03:45

When executing the courses.courseWork.studentSubmissions.modifyAttachments method in the Google Classroom API, a 403 error is returned when I try to add the att

相关标签:
3条回答
  • 2020-12-12 04:22

    It took me a while to figure this out myself, but the best way to go in my opinion is to first create the coursework (i.e. assignment or question) itself with Google Script or using the Classroom API. The coursework is then associated with the correct console project and you are cleared to manage the submissions from thereon.

    0 讨论(0)
  • 2020-12-12 04:25

    When modifying assignments/courseWork or student submissions, only the Developer console project that created those objects can modify them. This means that only projects that created the corresponding course work can modify them, otherwise a 403 PERMISSION_DENIED error is returned. You can easily determine if the course work item is associated with the Developer Console project making the request by checking the associatedWithDeveloper property on the Google Classroom course work response.

    0 讨论(0)
  • 2020-12-12 04:33

    All Classroom API methods may return a PERMISSION_DENIED (HTTP 403) error if an end user does not meet prerequisites for access. The message accompanying the error contains an error message to help you identify the cause and direct users to take the appropriate action.

    ProjectPermissionDenied indicates that the request attempted to modify a resource associated with a different Developer Console project.

    Possible Action: Indicate that your application cannot make the desired request. It can only be made by the Developer Console project of the OAuth client ID that created the resource.

    0 讨论(0)
提交回复
热议问题