import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const courseLessonInteraction = await client.courseLessonInteractions.retrieve(
'crsli_xxxxxxxxxxxx',
);
console.log(courseLessonInteraction.id);{
"id": "crsli_xxxxxxxxxxxx",
"completed": true,
"created_at": "2023-12-01T05:00:00.401Z",
"lesson": {
"id": "lesn_xxxxxxxxxxxxx",
"title": "Understanding Candlestick Patterns",
"chapter": {
"id": "chap_xxxxxxxxxxxxx"
}
},
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
},
"course": {
"id": "cors_xxxxxxxxxxxxx",
"title": "Introduction to Technical Analysis",
"experience": {
"id": "exp_xxxxxxxxxxxxxx"
}
}
}Retrieves the details of an existing course lesson interaction.
Required permissions:
courses:readcourse_analytics:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const courseLessonInteraction = await client.courseLessonInteractions.retrieve(
'crsli_xxxxxxxxxxxx',
);
console.log(courseLessonInteraction.id);{
"id": "crsli_xxxxxxxxxxxx",
"completed": true,
"created_at": "2023-12-01T05:00:00.401Z",
"lesson": {
"id": "lesn_xxxxxxxxxxxxx",
"title": "Understanding Candlestick Patterns",
"chapter": {
"id": "chap_xxxxxxxxxxxxx"
}
},
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
},
"course": {
"id": "cors_xxxxxxxxxxxxx",
"title": "Introduction to Technical Analysis",
"experience": {
"id": "exp_xxxxxxxxxxxxxx"
}
}
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The unique identifier of the lesson interaction to retrieve.
"crsli_xxxxxxxxxxxx"
A successful response
A record of a user's progress on a specific lesson, tracking whether they have completed it.
The unique identifier for the lesson interaction.
"crsli_xxxxxxxxxxxx"
Whether the user has finished this lesson.
The datetime the lesson interaction was created.
"2023-12-01T05:00:00.401Z"
The lesson that this progress record belongs to.
Show child attributes
The user whose progress is being tracked.
Show child attributes
The course that contains the tracked lesson.
Show child attributes
Was this page helpful?