Canvas APIs for Courses and Enrollments

At VitalSource, we are committed to helping your institution improve student access to course materials while also reducing costs and boosting outcomes. To improve course materials access, we rely on LMS data to match students and instructors to their assigned course content. Providing your LMS data to VitalSource automates manual setup processes and offers valuable insights and functionality for your campus.

Leveraging Canvas REST APIs, this integration gives VitalSource additional data to complement the VitalSource LTI Tool for Canvas and enhance the user experience across VitalSource applications.

Set up the API Roster Exchange

  1. Log into Canvas as an admin.
  2. Navigate to the Admin tab.
  3. Select the Root Account option.
    • Click Permissions  Account Roles Add Role
    • Role Name: VitalSource API Role, and click Save
    • Assign the following permissions to the role:
      • Courses - view list
      • Course content – view
      • Manage Course content - add/edit/delete
      • Manage LTI - add/edit/delete
      • SIS Data – read
      • Users - view list
      • Users - view login IDs
      • Users - view primary email address
Canvas Platform API User Permissions
To be able to call the Canvas API, we need to “authenticate” a Canvas user with the proper set of permissions so that we can retrieve data from the API. This is different from the Scopes, where the Scopes are for the Client ID. The Permissions are another layer of security for the API, where even though the developer key might have the proper scopes, the user who authenticated the API might not have the proper permission to call the necessary endpoints.

To properly set this up, create a new Canvas Account Role with the proper set of permissions, assign that role to a new Canvas user specially created for the integration, and then authenticate the Canvas API with that user.

  • Courses - view list   This permission allows us to view the list of courses associated with an account and term. One of the features of the VitalSource API integration is to ingest the courses within a given term into the VitalSource LTI tool. This allows us to match Canvas courses to book adoptions prior to students and faculty launching to the VitalSource LTI tool. Course materials can then be made available to the students & faculty on their first visit to the VitalSource LTI tool.
  • Course content - add/edit/delete This permission allows the user associated with the VitalSource API integration to add new content modules and module links into courses.
  • Course content - view  This permission allows the user associated with the VitalSource API integration to identify when VitalSource LTI tool links have been placed in a Canvas course. This enables us to better understand what course materials have been adopted in a Canvas course and pre-provision that content to the course users.
  • LTI - add/edit/delete This permission allows the user associated with the VitalSource API integration to add new LTI tools and links to courses.
  • SIS Data - read  This permission allows us to get course sis ids and user sis ids. These identifiers are used to match courses and users to their enrollments.
  • Users - view list  This permission allows us to view user data. This pulls users as related to their enrollment in specific courses.
  • Users - view login IDs  This permission allows us to view user login IDs. The user login IDs are used to match users to their enrollments.
  • Users - view primary email address  This permission allows us to receive user email addresses. User email addresses are not currently returned in Canvas APIs. Email addresses are used to match users to their enrollments.
      1. Create a new User in Canvas.
        • Click Admin → People → + People
        • Full Name: VitalSource API Integration
        • Email: integrations@vitalsource.com
        • SIS ID: vst_integration
        • Do not check Email the user about this account creation
        • Click Add User
      2. On the People page, locate this new user and click on their name
        • Under Login Information, click the Edit (pencil) button, leave all fields as is, and click Update Login
        • Click Edit again and set up a password for this user.
          • This username and password will be used to authenticate the integration. Be sure to hold on to the credentials.
      3. Add the Account Role to the new user
        • Admin → Settings → Admins
        • Scroll down to the bottom of the page and click + Account Admins
        • Select the VitalSource API Role from the drop-down and enter vst_integration in the blank box 
          • NOTE: Do not enter any other information, such as an email address, in this field. Entering anything other than "vst_integration" will cause the API to malfunction.
        • Click Continue
        • Click OK

How to Set Up 

  1. Log in to Canvas, navigate to the Admin tab, and select the account under which the VitalSource-enabled courses are set up.
  2. Click Developer Keys from the left navigation menu
  3. Click on +Developer Key and select +API Key
  4. Complete the Key Settings with the following information:
  5. Enforce Scopes
      • Disabled: If you choose to leave this disabled, VitalSource will have permission to call all available Canvas API endpoints.
      • Enabled: If you would like to enforce scopes, please select the "Allow Include Parameters" option and enable the following required endpoints:
        • Accounts
          • url:GET|/api/v1/accounts/:account_id/courses
          • url:GET|/api/v1/accounts
        • Courses
          • url:GET|/api/v1/courses
          • url:GET|/api/v1/courses/:id
        • Enrollment Terms
          • url:GET|/api/v1/accounts/:account_id/terms
          • url:GET|/api/v1/accounts/:account_id/terms/:id
        • Enrollments
          • url:GET|/api/v1/courses/:course_id/enrollments
        • External Tools
          • url:GET|/api/v1/courses/:course_id/external_tools
          • url:POST|/api/v1/courses/:course_id/external_tools
          • url:PUT|/api/v1/courses/:course_id/external_tools/:external_tool_id
          • url:DELETE|/api/v1/courses/:course_id/external_tools/:external_tool_id
        • Modules
          • url:GET|/api/v1/courses/:course_id/modules
          • url:GET|/api/v1/courses/:course_id/modules/:id
          • url:POST|/api/v1/courses/:course_id/modules
          • url:PUT|/api/v1/courses/:course_id/modules/:id
          • url:DELETE|/api/v1/courses/:course_id/modules/:id
          • url:GET|/api/v1/courses/:course_id/modules/:module_id/items
          • url:GET|/api/v1/courses/:course_id/modules/:module_id/items/:id
          • url:POST|/api/v1/courses/:course_id/modules/:module_id/items
          • url:PUT|/api/v1/courses/:course_id/modules/:module_id/items/:id
          • url:DELETE|/api/v1/courses/:course_id/modules/:module_id/items/:id
        • Sections
          • url:GET|/api/v1/courses/:course_id/sections
          • url:GET|/api/v1/courses/:course_id/sections/:id
          • url:GET|/api/v1/sections/:id
        • Users
          • url:GET|/api/v1/accounts/:account_id/users
          • url:GET|/api/v1/users/:id
  6. Click Save Key
  7. On the Developer Keys page, locate the Key you just created and toggle the State to ON
  8. Click Show Key in the Details column, and locate the Client ID.
  9. Copy both the Developer Key and the Client ID values and send to your VitalSource Customer Success Manager via a secure method. We recommend creating a single-use link that you can send via email with reveal.vitalsource.com.

Authenticate the API integration

  1. Your VitalSource contact will reply back with an API authentication URL 
    • Log out of your personal Canvas admin account
    • Click on the authentication URL
    • Sign in with the system user and password created in step 4
  2. Click Authenticate. You should receive a Success! message.
    • If you receive an error, report this to your VitalSource implementation contact.
    • If you receive the Success! message, locate the Course Material link within the course in your upcoming term and click the link (this will initiate the API sync).
      • If there are no courses with the Course Material link currently installed for the upcoming term, please add to either a real or test course and click.
        • This will initiate the API sync and allow us to begin pulling course and roster information for the term.
    •  
        1.  
Was this article helpful?