POST /scorm/packages/:packageId/launch
POST /scorm/packages/:packageId/launch
Use production SCORM API URL - can be overridden with env var for local development localhost:3001'; SCORM API key (for production - should be stored securely, per-tenant ideally) POST /api/scorm/packages/[packageId]/launch - Launch SCORM session Use service role client to bypass RLS for profile lookup Verify authentication with Clerk Get user profile for user_id (Supabase UUID) Parse request body (may include session_id for resuming) Body is optional - will use profile.id as user_id Use user_id from body if provided, otherwise use profile.id Forward request to SCORM API Add API key if configured (for production SCORM API) Check if it's a connection error
Endpoint
POST /scorm/packages/:packageId/launch
Authentication
This endpoint requires authentication. Include your authentication token in the request headers.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
packageId | string | Path parameter |
Error Responses
| Status Code | Error Code | Description |
|---|---|---|
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 503 | HTTP_503 | Error |
| 503 | HTTP_503 | Error |
| 500 | HTTP_500 | Internal Server Error |
Example Request
curl -X POST "https://api.allurelms.com/scorm/packages/packageId-value/launch" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'