Automate Google Classroom Class Creation with Google Sheets & Apps Script

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 3

  • @horyaycardo2650
    @horyaycardo2650 12 дней назад +1

    Hi Peter, your video is quite helpful. I tried it but am getting this error: [GoogleJsonResponseException: API call to classroom.courses.create failed with error: Invalid JSON payload received. Unknown name "CourseName" at 'course': Cannot find field. Any ideas why this error is coming up? Thank you!

    • @PeterHornerGoogleTech
      @PeterHornerGoogleTech  12 дней назад

      Hi @horyaycardo2650
      Thanks for the note - and glad you found the video helpful!
      That error usually pops up when the JSON payload you're sending to the Classroom API doesn't match what the API expects. Specifically, it's looking for a field called name to identify the course, not CourseName.
      Double-check that the JSON you're sending looks something like this:
      JSON
      {
      "name": "Your Course Name Here",
      // ... other course properties ...
      }
      Here's a link to the script: bit.ly/create-classroom-appsscript

    • @horyaycardo2650
      @horyaycardo2650 10 дней назад

      That helped Peter! Thanks much!