doc/api/link_selection_placement.md
External tools can be configured to be selectable as an LTI resource link during module item creation. The link_selection placement allows course designers (Admins/Instructors) to use the <a href="file.content_item.html" target="_blank">LTI Deep Linking</a> flow to select an LTI resource from an external tool and associate it with a Canvas module item.
Note: This placement is enabled by default in Canvas for LTI 1.1. It can be
removed by using the not_selectable configuration option (see <a
href="external_tools.html" target="_blank">External Tools API</a>). For LTI
1.3, the placement will only be enabled if listed in the placements in the
JSON configuration.
For configuration examples and links to the specification, please refer to the <a href="file.content_item.html" target="_blank">LTI Deep Linking documentation</a>. Simply replace the assignment_selection text with link_selection in the XML (LTI 1.0, 1.1, and 1.2) or JSON (LTI 1.3) examples.
assignment_selection placement</a> instead.
A user must be allowed to create Canvas module items and the tool must be configured to use the link_selection placement. While tools can be configured to use link_selection without deep linking, the workflow described here applies to tools that leverage deep linking with the link_selection placement. If a tool does not leverage deep linking, Canvas uses the URL configured at the tool-level or placement-level every time the tool is selected in step 2 below.
During <a href="https://community.canvaslms.com/t5/Instructor-Guide/How-do-I-add-an-external-URL-as-a-module-item/ta-p/967" target="_blank">module item creation</a>:
All of these settings are contained for the link_selection placement:
url: <url> (optional)
This is the URL that will be POSTed to when users click selects the tool from the module item creation view. It can be the same as the tool's URL, something different. Domain and URL matching are not enforced for link_selection launches; however, if LTI links are returned, Domain and URL matching is enforced. In order to prevent security warnings for users, it is recommended that URLs be over SSL (https). This setting is required if a url is not set on the main tool configuration.
text: <text> (optional)
This is the default text that will be shown on in the tool selection menu. This can be overridden by language-specific settings if desired by using the labels setting. This is required if a text value is not set on the main tool configuration.
labels: <set of locale-label pairs> (optional)
This can be used to specify different label names for different locales. For example, if an institution supports both English and Spanish interfaces, the text for the hover-over tip should change depending on the language being displayed. This option lets you support multiple languages for a single tool.
enabled: <boolean> (required)
Whether to enable this selection feature.
message_type: <an IMS LTI message type> (optional)
Sets the message_type to be sent during the LTI launch. It is expected that the tool use this to determine if a Deep Linking flow is being requested by Canvas and present an appropriate UI. A Deep Linking flow is highly recommended for this placement, but is not required. See the <a href="file.content_item.html" target="_blank">Deep Linking documentation</a> for more information, including accepted values.
selection_width: <pixels> (optional)
This sets the width (px) of the selection launch modal. Canvas may set a maximum or minimum width that overrides this option.
selection_height: <pixels> (optional)
This sets the height (px) of the selection launch modal. Canvas may set a maximum or minimum height that overrides this option.