I am trying to get if the course has the addon creation elegibility by using the google classroom API.
Docs -> https://developers.google.com/classroom/reference/rest/v1/courses/checkAddOnCreationEligibility
But it looks like the method was not found, probably because the addon is a feature that is in preview, this document https://developers.google.com/classroom/reference/preview mentions that you can use a preview by adding labels to the URL or by asking the Google team the API client with the preview features I already did but in the meantime I want to test by using labels in the URL but I am not entirely sure how. Does anyone know what could be the matter?
curl -X GET \
"https://classroom.googleapis.com/v1/courses/my_course_id:checkAddOnCreationEligibility" \
-H "Authorization: Bearer my_access_token
"
{
"error": {
"code": 404,
"message": "Method not found.",
"status": "NOT_FOUND"
}
}
A http response described in the documentation Docs -> https://developers.google.com/classroom/reference/rest/v1/courses/checkAddOnCreationEligibility
In general, you can specify the label in an HTTP request with a
X-Goog-Visibilities
header. In this case the value would beADD_ONS_ALPHA
. That's not super clear in the reference documentation.However, your Google Cloud project needs to have the corresponding preview feature enabled. Currently you need to apply for this particular preview, as it's private. See https://developers.google.com/classroom/add-ons#timeline to complete the interest form.