Reputation: 11
I'm getting error when trying Turning the Student Submission in google Classroom.
Using following code:
mService.courses().courseWork().studentSubmissions().turnIn(mCourseWork.getCourseId(),mCourseWork.getId() ,mySubmission.getId(),turnInStudentSubmissionRequest).execute();
Getting following error:
403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "@ProjectPermissionDenied The Developer Console project is not permitted to make this request.",
"reason" : "forbidden"
} ],
"message" : "@ProjectPermissionDenied The Developer Console project is not permitted to make this request.",
"status" : "PERMISSION_DENIED"
}
Upvotes: 1
Views: 592
Reputation: 309
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.
Upvotes: 2