showDeviceLinkQR() to initiate device pairing for the Corti mobile companion app. The method opens a QR pairing screen that lives on a separate URL. How you surface this is up to you, but a common pattern is a “Pair mobile device” option in your application’s settings that presents the URL in a modal or dedicated panel. The method resolves when the pairing request settles and returns the final status.
Applies to Web Component, Window API, and PostMessage. Examples on this page
use the Web Component API shape.
Enable the companion app surface with
configureApp() before offering mobile
pairing controls in your host application.QR code generation requires a second Keycloak token response for the same user — do not reuse the token from your original authentication request. Each application (desktop and companion) needs its own token so that both can refresh their sessions independently.
Usage
TypeScript
Prerequisites
- User must be authenticated in the Embedded Assistant.
companionApp.enabledshould be set totrueinconfigureApp().- The payload must include a valid access token and refresh token for the same user session.
Input validation
access_token: Must be a valid OAuth access token.refresh_token: Must be present. The mobile companion app uses it to complete pairing after approval.token_type: Must match the OAuth token response, usually"Bearer".
Returns
approved: The user approved the mobile device pairing request.denied: The user denied the mobile device pairing request.expired: The QR code or approval window expired before pairing completed.dismissed: A new QR request replaced the previous one, the embedded route was dismissed, or the pairing flow could not complete.
Possible errors
UNAUTHORIZED: User not authenticated.INVALID_PAYLOAD: Token payload is missing required values.INTERNAL_ERROR: Failed to create or display the pairing request.