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 table:
    Enable these scopes
    Scope name Section
    url:GET|/api/v1/accounts Accounts
    url:GET|/api/v1/accounts/:id Accounts
    url:GET|/api/v1/accounts/:account_id/sub_accounts Accounts
    url:GET|/api/v1/accounts/:account_id/courses Accounts
    url:GET|/api/v1/courses/:course_id/assignments Assignments
    url:GET|/api/v1/courses/:course_id/assignments/:id Assignments
    url:PUT|/api/v1/courses/:course_id/assignments/:id Assignments
    url:GET|/api/v1/courses/:course_id/blueprint_subscriptions Blueprint Courses
    url:GET|/api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations Blueprint Courses
    url:GET|/api/v1/courses/:course_id/content_migrations Content Migrations
    url:GET|/api/v1/courses/:id Courses
    url:PUT|/api/v1/courses/:id Courses
    url:POST|/api/v1/courses/:course_id/files Courses
    url:GET|/api/v1/courses/:course_id/discussion_topics Discussion Topics
    url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id Discussion Topics
    url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id Discussion Topics
    url:GET|/api/v1/accounts/:account_id/terms Enrollment Terms
    url:GET|/api/v1/courses/:course_id/files Files
    url:GET|/api/v1/courses/:course_id/files/:id Files
    url:PUT|/api/v1/files/:id Files
    url:DELETE|/api/v1/files/:id Files
    url:GET|/api/v1/courses/:course_id/media_objects Media Objects
    url:PUT|/api/v1/media_objects/:media_object_id Media Objects
    url:GET|/api/v1/media_objects/:media_object_id/media_tracks Media Objects
    url:PUT|/api/v1/media_objects/:media_object_id/media_tracks Media Objects
    url:GET|/api/v1/courses/:course_id/pages Pages
    url:GET|/api/v1/courses/:course_id/pages/:url_or_id Pages
    url:PUT|/api/v1/courses/:course_id/pages/:url_or_id Pages
    url:GET|/api/v1/courses/:course_id/quizzes Quizzes
    url:GET|/api/v1/courses/:course_id/quizzes/:id Quizzes
    url:PUT|/api/v1/courses/:course_id/quizzes/:id Quizzes
  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 your 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.