API Endpoint(s) and/or Zoom API Event(s)
https://applications.zoom.us/api/v1/lti/rich/open/meeting/list
Description
I wrote a node TypeScript function that checks whether meetings tied to Moodle courses in the Zoom LTI Pro exist. The function takes a userId, which I have checked to ensure are valid Zoom user IDs. The function generates a signature that is validated correctly. In addition, the function returned success on Friday, and everything stayed the same over the weekend on my end.
Error?
{
status: false,
errorCode: ‘2231’,
errorMessage: ‘Something went wrong. Please refresh this page.’
}
How To Reproduce
async function getMoodleCourseMeetingList(userId: string): Promise<GetCourseMeetingListResponseModel | void> {
const timestamp = new Date().getTime()
const ltiKey = process.env.ZOOM_LTI_KEY
const ltiSecret = process.env.ZOOM_LTI_SECRET
const ltiSignature = `isUpComing=true&key=${ltiKey}&pageNum=1&pageSize=20×tamp=${timestamp}&userId=${userId}`
const utf8ltiSignature = CryptoJS.enc.Utf8.parse(ltiSignature)
const hmacString = CryptoJS.HmacSHA1(utf8ltiSignature, ltiSecret)
const ltiSignatureHash = CryptoJS.enc.Base64url.stringify(hmacString)
const url = `${baseUrl}/open/meeting/list?${ltiSignature}`
const headers = {
'X-Lti-Signature': ltiSignatureHash
}
try {
const response = await Axios({
method: 'get',
url,
headers
})
console.log(response.data)
return response.data
} catch (error) {
console.error(error)
return
}
}```