Skip to main content

Building the JWT token with the content

Published: Not Available

Last Update: September 25, 2024

 

Learn expects a JWT token signed from your tool (based on the specifications from 1EdTech), however, this token requires certain properties or claims to be included. We'll review the information that needs to be sent back to Learn to properly create items.

The claims needed (object properties)

To properly create an item, the body of the JWT token should have the following required and optional claims (or properties). Please keep in mind that the body itself has to be a JSON object.

Property nameDescriptionValueRequired by Learn
issIssuer of the JWT tokenYour Application IDYes
audTarget server or service where the JWT must have been senthttps://blackboard.comYes
subID of the user that is performing the changes orYour Application IDYes
iatDate and time when the token was createdNumeric date time in Unix timeYes
expDate and time when the token will expireNumeric date time in Unix timeYes
localeLocale of the content being createdlocale code using the format languageCode_regionCodeNo
"https://purl.imsglobal.org/spec/lti/claim/deployment_id"Deployment ID sent by LearnUnique ID sent by Learn in the Deep Linking Launch requestYes
"https://purl.imsglobal.org/spec/lti/claim/message_type"Type of responseLtiDeepLinkingResponseYes
"https://purl.imsglobal.org/spec/lti/claim/version"Deep linking object version1.3.0Yes
"https://purl.imsglobal.org/spec/lti-dl/claim/data"Data object used by Learn to validate the creation requestdata value sent in the https://purl.imsglobal.org/spec/lti-dl/claim/deep_linking_settings claim. Must be sent back unalteredYes
"https://purl.imsglobal.org/spec/lti-dl/claim/content_items"Array of Content objects[{<ContentTypeItem>},{ContentTypeItem},{}]Yes

Sign and send to Blackboard Learn

Once the object is built, you can use your preferred library to create and sign the JWT token

Response sample

Deep Linking response body
{
"iss": "baaf7da8-f99a-42ca-a72f-292cfd0eb27d",
"aud": "https://blackboard.com",
"sub": "baaf7da8-f99a-42ca-a72f-292cfd0eb27d",
"iat": 1727287883,
"exp": 1727288183,
"locale": "en_US",
"https://purl.imsglobal.org/spec/lti/claim/deployment_id": "86e8b331-a6cd-486c-b006-9893c749e242",
"https://purl.imsglobal.org/spec/lti/claim/message_type": "LtiDeepLinkingResponse",
"https://purl.imsglobal.org/spec/lti/claim/version": "1.3.0",
"https://purl.imsglobal.org/spec/lti-dl/claim/data": "_4_1::_14_1::2::false::true::_13_1::e7a75af804fd4d9fb76812c7cde8ca70::false::false",
"https://purl.imsglobal.org/spec/lti-dl/claim/content_items": [
{
"type": "ltiResourceLink",
"title": "A title for LTI & 1.3 \" Link",
"text": "A & description with quotes \"",
"url": "https://dev.writingcode.dev/lti13",
"available": {
"startDateTime": "2024-09-25T13:00:00.000Z",
"endDateTime": "2024-10-25T13:00:00.000Z"
},
"submission": {
"endDateTime": "2024-10-25T13:00:00.000Z"
},
"lineItem": {
"scoreMaximum": 100,
"label": "Chapter 12 quiz",
"resourceId": "xyzpdq1234",
"tag": "originality"
}
}
]
}