Canvas Developer Key is a robust alternative to the access token approach as any Canvas REST endpoint (scope) can be enabled or disabled for integrations.

To set up the REST API integration you need to do these things

  1. Create an API developer key in your Canvas environment
  2. Configure Ally with the Canvas developer key

Create an API developer key

A Canvas API Developer Key is essentially a key ID and secret pair combined with a specific scope configuration.

  1. Go to the root account of the Canvas instance and go to Developer keys.
  2. Select the + Developer Key button and select API Key.
  3. Provide a Key Name and Owner Email.
  4. Copy and paste this link into the Redirect URIs field. Replace [AllyEnvironment] with the environment information your institution is hosted in. Replace [ClientID] with your Client ID.

    https://[AllyEnvironment]/api/v2/[ClientId]/auth/canvas/callback

  5. Select the Enforce Scopes toggle to turn it on.
  6. Check the Allow Include Parameters check box.
  7. Enable these scopes from the list:
    • url:GET|/api/v1/accounts
    • url:GET|/api/v1/accounts/:id
    • url:GET|/api/v1/accounts/:account_id/sub_accounts
    • url:GET|/api/v1/accounts/:account_id/terms
    • url:GET|/api/v1/accounts/:account_id/courses
    • url:GET|/api/v1/courses/:id
    • url:PUT|/api/v1/courses/:id
    • url:GET|/api/v1/courses/:course_id/files
    • url:GET|/api/v1/courses/:course_id/files/:id
    • url:POST|/api/v1/courses/:course_id/files
    • url:PUT|/api/v1/files/:id
    • url:DELETE|/api/v1/files/:id
    • url:GET|/api/v1/courses/:course_id/pages
    • url:GET|/api/v1/courses/:course_id/pages/:url
    • url:PUT|/api/v1/courses/:course_id/pages/:url
    • url:GET|/api/v1/courses/:course_id/discussion_topics
    • url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id
    • url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id
    • url:GET|/api/v1/courses/:course_id/assignments
    • url:GET|/api/v1/courses/:course_id/assignments/:id
    • url:PUT|/api/v1/courses/:course_id/assignments/:id
    • url:GET|/api/v1/courses/:course_id/quizzes
    • url:GET|/api/v1/courses/:course_id/quizzes/:id
    • url:PUT|/api/v1/courses/:course_id/quizzes/:id
    • url:GET|/api/v1/courses/:course_id/content_migrations
    • url:GET|/api/v1/courses/:course_id/blueprint_subscriptions
    • url:GET|/api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations
  8. Select Save.
  9. The new key is added to the Developer keys page and is Off by default.
  10. Turn the new key on.
  11. Copy the key ID number in the Details column. 

Ally environment for your region

Use the information for the Ally environment your institution is hosted in.

  • US data center: prod.ally.ac
  • Canadian data center: prod-ca-central-1.ally.ac
  • European data center: prod-eu-central-1.ally.ac
  • Singapore data center: prod-ap-southeast-1.ally.ac
  • Australian data center: prod-ap-southeast-2.ally.ac

Configure Ally with the developer key

You need to be signed into both your Canvas environment and you Ally Configuration page.

  1. Go to your Ally Configuration page and select the Canvas Developer Key tab.
  2. Select Configure Ally with Canvas Developer Key.
  3. Copy and paste the key and secret of the API developer key you created.
  4. Select Save and grant access.
  5. Select Authorize to grant Ally permission to use the Canvas Developer Key.

In the background, Ally will run a quick (minimal) check to ensure the correct scopes were added on the Canvas Developer Key.

All things being well, you should be redirected back to the configuration tool with a message saying the integration was configured correctly.