CybrHostedLabs
A server client that creates signed launch links. It uses your mint secret, not your organization API key.
createLaunchLink(params, options?)
Resolves with
{ token, url, embedUrl, expiresAt, learnerId }. Pass { signal } as the second argument to cancel.
Mint requests are never retried automatically, including rate limits. Failures throw CybrLabsError: 401 maps to invalid_key, and 429 maps to rate_limited with retryAfter. The client refuses redirects, so use the exact endpoint from onboarding.
A network failure can follow a successful mint. Repeating a request without learnerId creates another anonymous identity.
Browser events
subscribeToHostedLabEvents(options)
Import from @cybr/labs-sdk/hosted-browser in the page that holds the embedded card:
Returns a function that unsubscribes. Call it when the view closes or the iframe changes.
The helper checks the origin, source window, lab ID, and event shape. Events are best effort, can repeat, and are not proof of completion. Keep award decisions on your server.
