Build A Deep-Linking Form
If your application is a hub of multiple resources and/or activities, the LTI® protocol makes this easy to manage through the Deep Linking service. You can use this service to allow teachers and administrators to select one specific resource from your application when creating a resource link (activity) in the LMS. LTIAAS gives you access to this service through the Deep Linking flow and /api/deeplinking/form
API endpoint.
Please check our Performing Deep Linking guide to learn more about using this endpoint.
API Authentication Method | Supported |
---|---|
LTIK-AUTH-V2 | ✅ |
SERVICE-AUTH-V1 | |
Bearer |
Request Body
contentItems object[] required
options object
- 200
- 401
Schema
Self-submitting form that must be appended to the HTML body.
{
"form": "<form id=\"ltijs_submit\" style=\"display: none;\" action=\"https://ltiadvantagevalidator.imsglobal.org/ltitool/deeplinkresponse.html\" method=\"POST\"><input type=\"hidden\" name=\"JWT\" value=\"eyJhbGciOiJIUzIVCJ9.eyJzdWIbmFtZSI6IG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKV_adQssw5c\" /></form><script>document.getElementById(\"ltijs_submit\").submit()</script>"
}
Unauthorized. Please check our guide on Authenticating API requests to learn about how authentication works in the LTIAAS API.
Schema
Default value: 401
Default value: Unauthorized
details object required
{
"status": 401,
"error": "Unauthorized",
"details": {
"message": "INVALID_LTIK_AUTH_AUTHORIZATION_HEADER",
"description": "Invalid or expired ltik."
}
}
POST /api/deeplinking/form
Authorization
name: Authorizationtype: apiKeyin: headerdescription: An http Header who's value is of the format: `LTIK-AUTH-V2 <API_KEY>:<ltik>`. Where <API_KEY> should be replaced with your static API Key provided by LTIAAS and <ltik> is the ltik value passed to you on each new launch of your tool. Learn more about this in the <a href="/guides/api/authentication">Authenticating API requests</a> guide.
Request
Request
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}
const axios = require('axios');
const data = {
contentItems: [
{
type: "link",
title: "My Home Page",
url: "https://something.example.com/page.html",
icon: {
url: "https://lti.example.com/image.jpg",
width: 100,
height: 100
},
thumbnail: {
url: "https://lti.example.com/thumb.jpg",
width: 90,
height: 90
}
}
],
options: {
message: "Deep Linking successful!",
log: "deep_linking_successful"
}
};
const url = 'https://your.ltiaas.com/api/deeplinking/form';
const config = {
headers: {
'Authorization': `LTIK-AUTH-V2 ${API_KEY}:${ltik}`
}
};
try {
const response = await axios.post(url, data, config);
console.log(response.data);
} catch(error) {
console.log(error);
}