This script is designed to transfer school assignments for current classes from Canvas to the Todoist app.
As of 05/18/2021, the script does not support OAuth2 protocol, so API keys will need to be obtained manually.
In the /json/ folder, there is a file called access_tokens.json. It currently looks like:
{ "canvas-api-access": [ ], "todoist-api-access": "" }
For the canvas-api-access section, there are two pieces of information needed. The first is the Canvas website that is accessed for school. It usually looks like "https://[Abbreviated Institution Name].instructure.com". The second piece is the API key. It can be generated by going to the Settings tab in your Canvas account, under Web Services, under Approved Integrations. Click the + New Access Token button, follow the instructions, and copy the generated key as the second piece of information under the canvas-api-access portion of the .json file.
For the todoist-api-access section, only an API key is needed. It can be found by going to the Integrations tab in your accound, under the API token section. Copy and paste the token in the quotation marks in the access_token.json file.
You will also need two python libraries installed, canvasapi
and todoist-python
. You can do this by running pip install canvasapi
and pip install todoist-python
After adding this information to that file and installing the necessary libraries, you should be ready to run the script. It can be run by typing
py canvas_script.py
in terminal or command line