Search code examples
google-apigoogle-api-clientgoogle-classroom

updateMask may only contain \"draftGrade\" or \"assignedGrade\" 400 error on patching student submission through Google classroom API


I'm trying to add grades to a student submission through the Google classroom api but I get an error message which is confusing me. It says I should be sending the draftGrade key as part of the request, which I'm already doing. I've also tried with assignedGrade as the error says I should be using either one or the other, but I still get the same error. I've also tried different data types and formats so not sure at this point what else to try. Any ideas about what I could be doing wrong please?

enter image description here

Thank you very much.


Solution

  • We figured out what the issue was. Needed to add updateMask not as part of the body but as key params.

    enter image description here