import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const courseChapter = await client.courseChapters.retrieve('chap_xxxxxxxxxxxxx');
console.log(courseChapter.id);{
"id": "chap_xxxxxxxxxxxxx",
"title": "Getting Started",
"order": 42,
"lessons": [
{
"id": "lesn_xxxxxxxxxxxxx",
"title": "Understanding Candlestick Patterns",
"order": 42
}
]
}Retrieves the details of an existing course chapter.
Required permissions:
courses:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const courseChapter = await client.courseChapters.retrieve('chap_xxxxxxxxxxxxx');
console.log(courseChapter.id);{
"id": "chap_xxxxxxxxxxxxx",
"title": "Getting Started",
"order": 42,
"lessons": [
{
"id": "lesn_xxxxxxxxxxxxx",
"title": "Understanding Candlestick Patterns",
"order": 42
}
]
}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 chapter to retrieve.
"chap_xxxxxxxxxxxxx"
A successful response
A grouping of related lessons within a course, used to organize content into sections.
The unique identifier for the chapter.
"chap_xxxxxxxxxxxxx"
The display name of the chapter shown to students. Maximum 150 characters.
"Getting Started"
The sort position of this chapter within its parent course, starting from zero.
42
An ordered list of lessons in this chapter, sorted by display position. Hidden lessons are excluded for non-admin users.
Show child attributes
Was this page helpful?