A reusable django app for handling the workflow of generating per-user Canvas API oauth tokens. The app assumes that your django project is using the django_auth_lti middleware.
pip install django-canvas-api-token
- Add
"canvas_api_token"
to yourINSTALLED_APPS
in django settings - Insert the url configuration into your project/app urls.py
url(r'^canvas_api_token/', include('canvas_api_token.urls'))
- Run
python manage.py migrate
to ensure db tables are initialized. - Use the admin site to create a
canvas_dev_key
entry using theconsumer_key
and developer key values from your Canvas consumer where ...
client_id
is the integer client id value of your Canvas developer keyclient_secret
is the random string 'secret' value of your Canvas developer key
If you are making use of the canvas-docker image for development it comes with a pre-loaded developer key. If, in addition, you are using this extension app (django-canvas-api-token) within harvard-dce/dce_course_admin and using the example consumer key, the developer key record values would be:
client_id=1
client_secret=test_developer_key
consumer_key=dce_course_admin
django-canvas-api-token is licensed under the BSD license
2017 President and Fellows of Harvard College