JavaScript
import Whop from '@whop/sdk'; const client = new Whop({ apiKey: 'My API Key', }); const courseChapter = await client.courseChapters.retrieve('chap_xxxxxxxxxxxxx'); console.log(courseChapter.id);
{ "id": "chap_xxxxxxxxxxxxx", "title": "<string>", "order": 42, "lessons": [ { "id": "lesn_xxxxxxxxxxxxx", "title": "<string>", "order": 42 } ] }
Retrieves a course chapter by ID
Required permissions:
courses:read
The app API key from an app from the /dashboard/developer page
The ID of the chapter
"chap_xxxxxxxxxxxxx"
A successful response
A chapter from the courses app
The ID of the chapter. Looks like chap_XXX
The title of the chapter
The order of the chapter within its course
42
The lessons in this chapter
Show child attributes
The ID of the lesson
"lesn_xxxxxxxxxxxxx"
The title of the lesson
The order of the lesson within its chapter
Was this page helpful?