# Verifications ## List active verifications `client.app.verifications.list(RequestOptionsoptions?): VerificationListResponse` **get** `/v1/app/setup/verifications` List pending and active device verifications. Use this to recover state without a WebSocket connection. ### Returns - `VerificationListResponse` - `items: Array` - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const verifications = await client.app.verifications.list(); console.log(verifications.items); ``` #### Response ```json { "items": [ { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } ] } ``` ## Start device verification `client.app.verifications.create(VerificationCreateParamsbody?, RequestOptionsoptions?): VerificationCreateResponse` **post** `/v1/app/setup/verifications` Start verifying this device from another signed-in device. ### Parameters - `body: VerificationCreateParams` - `purpose?: "login" | "device"` Why this verification is being started. - `"login"` - `"device"` - `userID?: string` Beeper user ID to verify. Defaults to the signed-in user. ### Returns - `VerificationCreateResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const verification = await client.app.verifications.create(); console.log(verification.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Get verification `client.app.verifications.retrieve(stringverificationID, RequestOptionsoptions?): VerificationRetrieveResponse` **get** `/v1/app/setup/verifications/{verificationID}` Get the current state of a device verification transaction. ### Parameters - `verificationID: string` Verification ID. ### Returns - `VerificationRetrieveResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const verification = await client.app.verifications.retrieve('x'); console.log(verification.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Accept device verification `client.app.verifications.accept(stringverificationID, RequestOptionsoptions?): VerificationAcceptResponse` **post** `/v1/app/setup/verifications/{verificationID}/accept` Accept an incoming device verification request. ### Parameters - `verificationID: string` Verification ID. ### Returns - `VerificationAcceptResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const response = await client.app.verifications.accept('x'); console.log(response.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Cancel device verification `client.app.verifications.cancel(stringverificationID, VerificationCancelParamsbody?, RequestOptionsoptions?): VerificationCancelResponse` **post** `/v1/app/setup/verifications/{verificationID}/cancel` Cancel an active device verification request. ### Parameters - `verificationID: string` Verification ID. - `body: VerificationCancelParams` - `code?: string` Optional cancellation code. - `reason?: string` Optional user-facing cancellation reason. ### Returns - `VerificationCancelResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const response = await client.app.verifications.cancel('x'); console.log(response.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Domain Types ### Verification List Response - `VerificationListResponse` - `items: Array` - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Verification Create Response - `VerificationCreateResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Verification Retrieve Response - `VerificationRetrieveResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Verification Accept Response - `VerificationAcceptResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Verification Cancel Response - `VerificationCancelResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. # Qr ## Scan verification QR code `client.app.verifications.qr.scan(QrScanParamsbody, RequestOptionsoptions?): QrScanResponse` **post** `/v1/app/setup/verifications/qr/scan` Submit the QR code scanned from another signed-in device. ### Parameters - `body: QrScanParams` - `data: string` QR code payload scanned from the other device. ### Returns - `QrScanResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const response = await client.app.verifications.qr.scan({ data: 'x' }); console.log(response.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Confirm QR code scan `client.app.verifications.qr.confirmScanned(stringverificationID, RequestOptionsoptions?): QrConfirmScannedResponse` **post** `/v1/app/setup/verifications/{verificationID}/qr/confirm-scanned` Confirm that another device scanned this device QR code. ### Parameters - `verificationID: string` Verification ID. ### Returns - `QrConfirmScannedResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const response = await client.app.verifications.qr.confirmScanned('x'); console.log(response.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Domain Types ### Qr Scan Response - `QrScanResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Qr Confirm Scanned Response - `QrConfirmScannedResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. # SAS ## Start emoji verification `client.app.verifications.sas.start(stringverificationID, RequestOptionsoptions?): SASStartResponse` **post** `/v1/app/setup/verifications/{verificationID}/sas/start` Start emoji comparison for device verification. ### Parameters - `verificationID: string` Verification ID. ### Returns - `SASStartResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const response = await client.app.verifications.sas.start('x'); console.log(response.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Confirm emoji verification `client.app.verifications.sas.confirm(stringverificationID, RequestOptionsoptions?): SASConfirmResponse` **post** `/v1/app/setup/verifications/{verificationID}/sas/confirm` Confirm that the emoji or number sequence matches on both devices. ### Parameters - `verificationID: string` Verification ID. ### Returns - `SASConfirmResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop({ accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted }); const response = await client.app.verifications.sas.confirm('x'); console.log(response.session); ``` #### Response ```json { "session": { "e2ee": { "crossSigning": true, "firstSyncDone": true, "hasBackedUpRecoveryKey": true, "initialized": true, "keyBackup": true, "secrets": { "masterKey": true, "megolmBackupKey": true, "recoveryKey": true, "selfSigningKey": true, "userSigningKey": true }, "secretStorage": true, "verified": true, "recoveryKeyGeneratedAt": 0 }, "state": "needs-login", "matrix": { "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } }, "verification": { "id": "id", "availableActions": [ "accept" ], "direction": "incoming", "methods": [ "qr" ], "purpose": "login", "state": "requested", "error": { "code": "code", "reason": "reason" }, "otherDevice": { "id": "id", "name": "name" }, "otherUserID": "otherUserID", "qr": { "data": "data" }, "sas": { "emojis": "emojis", "decimals": "decimals" } } } ``` ## Domain Types ### SAS Start Response - `SASStartResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. ### SAS Confirm Response - `SASConfirmResponse` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: E2EE` Encrypted messaging setup status. - `crossSigning: boolean` Whether this account can verify trusted devices. - `firstSyncDone: boolean` Whether the first encrypted message sync is complete. - `hasBackedUpRecoveryKey: boolean` Whether the user confirmed that they saved their recovery key. - `initialized: boolean` Whether encrypted messaging setup has started. - `keyBackup: boolean` Whether encrypted message backup is available. - `secrets: Secrets` Encrypted messaging keys available on this device. - `masterKey: boolean` Whether the account identity key is available. - `megolmBackupKey: boolean` Whether the encrypted message backup key is available. - `recoveryKey: boolean` Whether a recovery key is available. - `selfSigningKey: boolean` Whether the device trust key is available. - `userSigningKey: boolean` Whether the user trust key is available. - `secretStorage: boolean` Whether secure key storage is available. - `verified: boolean` Whether this device is trusted for encrypted messages. - `recoveryKeyGeneratedAt?: number` Unix timestamp for when the recovery key was created. - `state: "needs-login" | "initializing" | "needs-cross-signing-setup" | 4 more` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `"needs-login"` - `"initializing"` - `"needs-cross-signing-setup"` - `"needs-verification"` - `"needs-secrets"` - `"needs-first-sync"` - `"ready"` - `matrix?: Matrix` Signed-in account details. Omitted until sign-in is complete. - `deviceID: string` Current device ID. - `homeserver: string` Beeper homeserver URL for this account. - `userID: string` Signed-in Beeper user ID. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices. - `verification?: Verification` Trusted device verification progress. - `id: string` Verification ID to pass in verification action paths. - `availableActions: Array<"accept" | "cancel" | "qr.confirmScanned" | 2 more>` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: "incoming" | "outgoing"` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: Array<"qr" | "sas">` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: "login" | "device"` Why this verification exists. - `"login"` - `"device"` - `state: "requested" | "ready" | "sas_ready" | 4 more` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error?: Error` Verification error details, if verification stopped. - `code: string` Verification error code. - `reason: string` User-facing verification error message. - `otherDevice?: OtherDevice` Other device participating in verification. - `id: string` Other device ID. - `name?: string` Other device display name, if known. - `otherUserID?: string` Other Beeper user participating in verification. - `qr?: Qr` QR verification data. - `data: string` QR code payload to display for verification. - `sas?: SAS` Emoji or number comparison data for verification. - `emojis: string` Emoji sequence to compare on both devices. - `decimals?: string` Number sequence to compare on both devices.