Learn R Programming

vvcanvas

The open source R package vvcanvas provides a convenient interface to interact with the Canvas Learning Management System (LMS) API. It allows users to authenticate, retrieve course information, fetch specific details, and perform various operations within the Canvas LMS.

Installation

You can install the vvcanvas package from GitHub using the following command:

devtools::install_github("vusaverse/vvcanvas")

It is also possible to install from CRAN:

install.packages("vvcanvas")

Features

To see which functions are available in which section based on the CANVAS LMS API structure, please refer to the reference page of the vvcanvas package. The reference page provides a comprehensive list of functions available in the package, organized by category.

Additionally, the package includes vignettes that provide more detailed information on how to use the functions in the package.

Getting Started

To begin using the vvcanvas package, you need to authenticate with the Canvas LMS API by obtaining an API key and base URL. Follow these steps to get started:

  1. Acquire an API key from your Canvas LMS instance. You may need to consult your Canvas administrator or refer to the Canvas API documentation for instructions on obtaining an API key.

  2. Once you have the API key, load the vvcanvas library and use the canvas_authenticate function to authenticate with the Canvas LMS API. Provide the API key and the base URL of your Canvas instance as parameters. Here's an example:

library(vvcanvas)

# Replace the placeholders with your API key and base URL
api_key <- "YOUR_API_KEY"
base_url <- "https://your_canvas_domain.com/"

# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate(api_key, base_url)

## Alternatively, you can set system variables

# Set the API key and base URL as environment variables
Sys.setenv(CANVAS_API_KEY = "YOUR_API_KEY")
Sys.setenv(CANVAS_BASE_URL = "https://your_canvas_domain.com/")

# Authenticate with the Canvas LMS API
canvas <- canvas_authenticate()

With the authentication step completed, you can now utilize the various functions provided by the vvcanvas package to interact with the Canvas LMS.

In order to retrieve a dataframe with all courses you can use the following function:

# Pass the canvas object to the get_courses function
courses <- get_courses(canvas)

Copy Link

Version

Install

install.packages('vvcanvas')

Monthly Downloads

294

Version

0.0.8

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Hajo Bons

Last Published

January 19th, 2026

Functions in vvcanvas (0.0.8)

get_course_details

Get Course Details from Canvas LMS API
get_course_announcements

Retrieves course announcements.
get_course_media_objects

Retrieves the media objects in a course.
get_course_pages

Retrieves the pages within a course.
get_course_participation

Get course-level participation data from Canvas LMS API
get_course_quizzes

Retrieves course quizzes.
get_course_files

Retrieves a list of files within a course.
get_course_root_folder

Retrieves root folder of a course.
get_course_sections

Retrieves course sections.
get_department_statistics_by_subaccount

Get department-level statistics by subaccount from the Canvas LMS API
get_discussions

Retrieves the discussion topics within a course.
get_course_enrollments

Retrieves the course enrollments for a course.
get_course_groups

Retrieves the list of groups in a course.
get_course_gradebook

Constructs the gradebook of a course.
get_department_grade_data

Get department-level grade data from the Canvas LMS API
get_department_statistics

Get department-level statistics from the Canvas LMS API
get_department_participation_data

Get department-level participation data from the Canvas LMS API
get_courses

Get Courses from Canvas LMS API
get_quiz_submissions

Retrieves quiz submissions.
get_page_content

Retrieves the content body of a specified page.
get_roles

Retrieve Roles for a Canvas Account
get_group_info

Get information about a single group
get_course_folders

Retrieves course folders.
get_section_information

Get Section Information in Canvas LMS
get_favorite_courses

Get Favorite Courses in Canvas LMS
get_modules

Retrieves the modules within a course.
get_group_users

Get users in a group
get_module_items

Retrieves the items within a specific module.
get_folder_files

Retrieves files in a specific folder.
get_group_memberships

Get group memberships
get_group_categories

Get group categories for a context
list_all_enrollment_terms

List All Enrollment Terms
get_users

Get all users from an account
get_single_conversation

Retrieves a single conversation.
get_course_users

Retrieves the users in a course.
get_course_students

Retrieves the list of students in a course.
get_user_course_assignment_data

Get user-in-a-course-level assignment data from the Canvas LMS API
get_student_summaries

Get student summaries for a course from Canvas LMS API
get_user_folders

Retrieves folders of the current user.
get_user_course_messaging_data

Get user-in-a-course-level messaging data from the Canvas LMS API
get_section_students

Retrieve Students in a Section
paginate

Helper to paginate Canvas API GET requests
query_progress

Queries progress.
update_section_grades

Updates assignment grades in a section.
get_user_course_participation_data

Get user-in-a-course-level participation data from the Canvas LMS API
update_page

Update a Page in Canvas LMS
%>%

Pipe operator
upload_qti_file_with_migration

Upload QTI File with Content Migration
upload_folder_file

Uploads a file to a specific folder.
update_quiz

Modify an existing quiz.
post_new_discussion

Post a New Discussion in Canvas LMS
upload_file

Upload a file in Canvas LMS.
update_course_grades

Updates assignment grades in a course.
create_group_category

Create a Group Category in Canvas LMS
create_course_section

Create a Course Section in Canvas LMS
append_access_token

Appends access_token to URL if not present
canvas_authenticate

Authenticate with Canvas LMS API
canvas_base_url

Get the Canvas base URL from the environment variable
create_conversation

Creates a new conversation with one or more recipients.
canvas_api_key

Get the Canvas API key from the environment variable
create_assignment_group

Create an Assignment Group in Canvas LMS
create_folder

Create a Folder in Canvas LMS
create_course_datalake

Create a data lake for a course.
create_module

Create a Module in Canvas LMS
get_accounts

Get a list of accounts from the Canvas LMS API
create_module_item

Create a Module Item in Canvas LMS
create_page

Create a Page in Canvas LMS
delete_course_section

Delete a Course Section in Canvas LMS
extract_next_url

Extracts the 'next' URL from a Link header
edit_section

Edit a Course Section in Canvas LMS
download_course_file

Downloads a file from a given URL.
get_assignment_data

Get course-level assignment data from the Canvas LMS API
get_assignments

Get Assignments from Canvas LMS API
get_conversations

Retrieves conversations.
delete_page

Delete a Page in Canvas LMS
get_all_courses

Retrieves a paginated list of all courses visible in the public index.
get_assignment_details

Get Assignment Details from Canvas LMS API
get_assignment_submissions

Retrieves assignment submissions.
get_assignment_groups

Retrieves the assignment groups within a course.
get_calendar_events

Get Calendar Events from Canvas LMS API