在Google Classroom API中執行courses.courseWork.studentSubmissions.modifyAttachments
方法時,如果嘗試將附件添加到學生的提交中,則會返回403錯誤。Google課堂API修改附件
GoogleJsonResponseException:
{
"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"
}
該調用是通過經過身份驗證的學生帳戶進行的,並作爲鏈接資源添加。開發者控制檯項目已啓用Google Classroom API,並且其他對Google Classroom API的調用正常工作,例如courses.list
和courses.courseWork.studentSubmissions.get
。我錯過了什麼?在Google課堂文檔網站中使用Try it!應用時,返回相同的錯誤。