Endpoint Documentation from https://canvas.instructure.com/doc/api/
- Go to
settings
on your canvas page - Scroll down to Approved Integrations
- Click: + New Access Token
- Purpose:
canvas-python
- Leave Blank (token won't work after date, if specified)
- Purpose:
- Copy Access Token
- Look at the url in your browser and remember/save the ID(prefix)
<prefix>.instructure.com
- uses folder
~\.canvas
, with files:- credentials
- access_token
- config
- base_url
- credentials
utils/setup.py
contains helpful functions for setting this up
-
<>_self
-
<>_profile
-
<>_settings
-
get_colors
-
get_course_nicknames
-
<>_courses
-
<>_assignments
-
<>_planner_items
-
<>_planner_notes
-
<>_planner_overrides
-
mark_complete
-
<>_todos
-
<>_notifications
-
<>_calendar_events
-
<>_upcoming_events
-
<>_inbox
-
create_conversation
-
get_folders
-
get_course_folders
-
get_users_folders
-
get_files
-
get_my_folders
-
get_course_folders
orget_my_folders
returns a List of Folder objects, which can be downloaded or used to query sub-folders and files inside it.for folder in api.get_course_folders(course_id="<course_id>"): # folder.download() for sub_folder in folder.folders(): # sub_folder.download() for file in sub_folder.files(): print(file.id, file.filename) # file.download()
- check utils
__init__.py
for setup help and help functions.