Configuring the LTI application - learningtapestry/canvas-google-drive-connector GitHub Wiki
NOTE: This LTI app can be configured as a global app by a Canvas Admin, or for specific courses by a user with instructor permissions on that course. This documentation describes the process from an admin, but it's similar for an instructor, just the scope of the LTI app will be for a specific course.
Set up GDrive API
Before you can set up the application you need to generate a Google Drive API Key. You can do this on the Google API Console. You will first need to set up a project, then add a credential from the credentials tab (it looks like a key): Click the Create Credentials dropdown, Select a type of OAuth client ID, then select Web Application.
For the Authorized JavaScript origins field, enter the hostname and protocol where you will be deploying this application (this is not the same as your Canvas instance). For the Authorized redirect URIs field, enter the hostname and protocol followed by /google-auth/callback
.
So if you were deploying this application with the hostname canvas-gdrive-connector.example.com
you would have:
Authorized JavaScript origins
https://canvas-gdrive-connector.example.com
Authorized redirect URIs
https://canvas-gdrive-connector.example.com/google-auth/callback
You re not limited to just one hostname.
Note that Google applies daily quotas for usage of its APIs. The courtesy limit is 1,000,000,000 queries per day which should be sufficient for all but the biggest educational organizations.
You will need to add the client ID and Secret that are created in this process as environment variables in the application when you deploy it.
Configuring in Canvas
The Google Drive Connector is implemented as an LTI Application. From the Admin menu, click settings
then find the tab labeled Apps
. Then click the button labeled +App
Change the dropdown for Configuration Type
to By URL
.
Give your app a descriptive name (such as Canvas Google Drive Connector
) that will distinguish it from other Apps you may use.
If your app hostname is https://canvas-gdrive-connector.example.com/
, put https://canvas-gdrive-connector.example.com/config.xml
in the the Config URL
field.
Paste the Client ID that you got from the Google Drive API configuration into the Consumer Key
field and the Client Secret from Google Drive into the Consumer Secret
field.
Click Submit
. That's it! You can test the application by going to a course page. In the course navigation you should see a Menu Item for Google Drive
. Clicking that link should prompt you to sign in to Google, and then display your google drive contents.