I'm using the Google Classroom API with Python, and am trying to invite a student to a course, using the invitations.create()
method. However, I keep getting a "404 requested entity not found" error, and I'm unsure what's causing it.
service = build('classroom', 'v1', credentials=creds)
info = {
"userId": "zariftwitters@gmail.com",
"courseId": "117906298438634973718",
"role": "STUDENT"
}
i = service.invitations().create(body=info).execute()
Error message:
Http Error 404 when requesting
https://classroom.googleapis.com/v1/invitations?alt=json returned
"Requested entity was not found."