This method returns the following error codes:
PERMISSION_DENIED if the requesting user is not permitted to access therequested course, create announcements in the requested course, share aDrive attachment, or for access errors.
INVALID_ARGUMENT if the request is malformed.
NOT_FOUND if the requested course does not exist.
FAILED_PRECONDITION for the following request error:
AttachmentNotVisible
gc_courses_announcements_create(Announcement, courseId)
| Announcement | The gc_announcement object to pass to this method |
|---|---|
| courseId | Identifier of the course |
Authentication scopes used by this function are:
https://www.googleapis.com/auth/classroom.announcements
Set options(googleAuthR.scopes.selected = c("https://www.googleapis.com/auth/classroom.announcements")
Then run googleAuthR::gar_auth() to authenticate.
See gar_auth for details.
Other Announcement functions:
gc_announcement(),
gc_courses_announcements_patch()