# App ## Get Beeper app setup state `app.session() -> AppSessionResponse` **get** `/v1/app/setup` Return the current Beeper Desktop or Beeper Server sign-in and encrypted messaging setup state. This endpoint is public before sign-in so apps can discover that sign-in is needed; after sign-in, pass a read token. ### Returns - `class AppSessionResponse: …` - `e2ee: E2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: E2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[Matrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.session() print(response.e2ee) ``` #### Response ```json { "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" } } } ``` ## Domain Types ### Verification - `class Verification: …` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[Error]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[OtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[Qr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### App Session Response - `class AppSessionResponse: …` - `e2ee: E2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: E2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[Matrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. # Login ## Start Beeper app setup `app.login.start() -> LoginStartResponse` **post** `/v1/app/setup/start` Start setting up Beeper Desktop or Beeper Server. The flow supports existing Beeper accounts and new account creation. ### Returns - `class LoginStartResponse: …` - `setup_request_id: str` Setup request ID to use in the next sign-in step. - `sign_in_methods: List[str]` Available sign-in methods for this setup request. ### Example ```python from beeper_desktop_api import BeeperDesktop client = BeeperDesktop() response = client.app.login.start() print(response.setup_request_id) ``` #### Response ```json { "setupRequestID": "setupRequestID", "signInMethods": [ "string" ] } ``` ## Send setup sign-in code `app.login.email(LoginEmailParams**kwargs)` **post** `/v1/app/setup/email` Send a sign-in code to the user email address for app setup. ### Parameters - `email: str` Email address to send the sign-in code to. - `setup_request_id: str` Setup request ID returned by the start step. ### Example ```python from beeper_desktop_api import BeeperDesktop client = BeeperDesktop() client.app.login.email( email="dev@stainless.com", setup_request_id="setupRequestID", ) ``` ## Complete setup sign-in with code `app.login.response(LoginResponseParams**kwargs) -> LoginResponseResponse` **post** `/v1/app/setup/response` Finish setup sign-in with the code sent to the user email address. If the user needs a new account, the response includes account creation copy and username suggestions. ### Parameters - `response: str` Sign-in code from the user email. - `setup_request_id: str` Setup request ID returned by the start step. ### Returns - `LoginResponseResponse` - `class Success: …` - `matrix: SuccessMatrix` Account credentials for first-party app setup. - `access_token: str` Beeper account access token. Returned once for first-party app setup. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `session: SuccessSession` Current app sign-in and encrypted messaging setup state after sign-in. - `e2ee: SuccessSessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SuccessSessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SuccessSessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SuccessSessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SuccessSessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SuccessSessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SuccessSessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SuccessSessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `class RegistrationRequired: …` - `copy: RegistrationRequiredCopy` Copy to display during account creation. - `submit: Literal["Continue"]` Submit button label. - `"Continue"` - `terms: Literal["By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."]` Terms and privacy notice to show before account creation. - `"By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."` - `title: Literal["Choose your username"]` Title for the username step. - `"Choose your username"` - `username_placeholder: Literal["Username"]` Placeholder for the username field. - `"Username"` - `lead_token: str` Registration token returned by Beeper. - `registration_required: Literal[true]` Indicates that the user needs to create a Beeper account. - `true` - `setup_request_id: str` Setup request ID to use when creating the account. - `username_suggestions: Optional[List[str]]` Suggested usernames for the new account. ### Example ```python from beeper_desktop_api import BeeperDesktop client = BeeperDesktop() response = client.app.login.response( response="response", setup_request_id="setupRequestID", ) print(response) ``` #### Response ```json { "matrix": { "accessToken": "accessToken", "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "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" } } } } ``` ## Create account for setup `app.login.register(LoginRegisterParams**kwargs) -> LoginRegisterResponse` **post** `/v1/app/setup/register` Create a Beeper account after the user chooses a username and accepts the Terms of Use. ### Parameters - `accept_terms: Literal[true]` Confirms that the user agreed to our [terms of use](https://www.beeper.com/terms-onboarding) and has read our [privacy policy](https://www.beeper.com/privacy). - `true` - `lead_token: str` Registration token returned by Beeper. - `setup_request_id: str` Setup request ID returned by the start step. - `username: str` Username selected by the user. ### Returns - `class LoginRegisterResponse: …` - `matrix: Matrix` Account credentials for first-party app setup. - `access_token: str` Beeper account access token. Returned once for first-party app setup. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `session: Session` Current app sign-in and encrypted messaging setup state after sign-in. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python from beeper_desktop_api import BeeperDesktop client = BeeperDesktop() response = client.app.login.register( accept_terms=True, lead_token="leadToken", setup_request_id="setupRequestID", username="x", ) print(response.matrix) ``` #### Response ```json { "matrix": { "accessToken": "accessToken", "deviceID": "deviceID", "homeserver": "homeserver", "userID": "userID" }, "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" } } } } ``` ## Domain Types ### Login Start Response - `class LoginStartResponse: …` - `setup_request_id: str` Setup request ID to use in the next sign-in step. - `sign_in_methods: List[str]` Available sign-in methods for this setup request. ### Login Response Response - `LoginResponseResponse` - `class Success: …` - `matrix: SuccessMatrix` Account credentials for first-party app setup. - `access_token: str` Beeper account access token. Returned once for first-party app setup. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `session: SuccessSession` Current app sign-in and encrypted messaging setup state after sign-in. - `e2ee: SuccessSessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SuccessSessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SuccessSessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SuccessSessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SuccessSessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SuccessSessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SuccessSessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SuccessSessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `class RegistrationRequired: …` - `copy: RegistrationRequiredCopy` Copy to display during account creation. - `submit: Literal["Continue"]` Submit button label. - `"Continue"` - `terms: Literal["By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."]` Terms and privacy notice to show before account creation. - `"By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."` - `title: Literal["Choose your username"]` Title for the username step. - `"Choose your username"` - `username_placeholder: Literal["Username"]` Placeholder for the username field. - `"Username"` - `lead_token: str` Registration token returned by Beeper. - `registration_required: Literal[true]` Indicates that the user needs to create a Beeper account. - `true` - `setup_request_id: str` Setup request ID to use when creating the account. - `username_suggestions: Optional[List[str]]` Suggested usernames for the new account. ### Login Register Response - `class LoginRegisterResponse: …` - `matrix: Matrix` Account credentials for first-party app setup. - `access_token: str` Beeper account access token. Returned once for first-party app setup. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `session: Session` Current app sign-in and encrypted messaging setup state after sign-in. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. # Verification # Recovery Key ## Verify with recovery key `app.login.verification.recovery_key.verify(RecoveryKeyVerifyParams**kwargs) -> RecoveryKeyVerifyResponse` **post** `/v1/app/setup/verification/recovery-key` Unlock encrypted messages with the user recovery key. ### Parameters - `recovery_key: str` Recovery key saved by the user. ### Returns - `class RecoveryKeyVerifyResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.login.verification.recovery_key.verify( recovery_key="x", ) print(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" } } } } ``` ## Domain Types ### Recovery Key Verify Response - `class RecoveryKeyVerifyResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. # Reset ## Create new recovery key `app.login.verification.recovery_key.reset.create(ResetCreateParams**kwargs) -> ResetCreateResponse` **post** `/v1/app/setup/verification/recovery-key/reset` Create a new recovery key when the user cannot use the existing one. ### Parameters - `existing_recovery_key: Optional[str]` Existing recovery key, if the user has it. ### Returns - `class ResetCreateResponse: …` - `recovery_key: str` New recovery key. Show it once and ask the user to save it. - `session: Session` Current app sign-in and encrypted messaging setup state after creating the new recovery key. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) reset = client.app.login.verification.recovery_key.reset.create() print(reset.recovery_key) ``` #### Response ```json { "recoveryKey": "recoveryKey", "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" } } } } ``` ## Confirm new recovery key `app.login.verification.recovery_key.reset.confirm(ResetConfirmParams**kwargs) -> ResetConfirmResponse` **post** `/v1/app/setup/verification/recovery-key/reset/confirm` Confirm that the new recovery key should be used for this account. ### Parameters - `recovery_key: str` New recovery key returned by the reset step. ### Returns - `class ResetConfirmResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.login.verification.recovery_key.reset.confirm( recovery_key="x", ) print(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" } } } } ``` ## Domain Types ### Reset Create Response - `class ResetCreateResponse: …` - `recovery_key: str` New recovery key. Show it once and ask the user to save it. - `session: Session` Current app sign-in and encrypted messaging setup state after creating the new recovery key. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Reset Confirm Response - `class ResetConfirmResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. # Verifications ## List active verifications `app.verifications.list() -> VerificationListResponse` **get** `/v1/app/setup/verifications` List pending and active device verifications. Use this to recover state without a WebSocket connection. ### Returns - `class VerificationListResponse: …` - `items: List[Item]` - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[ItemError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[ItemOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[ItemQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[ItemSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) verifications = client.app.verifications.list() print(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 `app.verifications.create(VerificationCreateParams**kwargs) -> VerificationCreateResponse` **post** `/v1/app/setup/verifications` Start verifying this device from another signed-in device. ### Parameters - `purpose: Optional[Literal["login", "device"]]` Why this verification is being started. - `"login"` - `"device"` - `user_id: Optional[str]` Beeper user ID to verify. Defaults to the signed-in user. ### Returns - `class VerificationCreateResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) verification = client.app.verifications.create() print(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 `app.verifications.retrieve(strverification_id) -> VerificationRetrieveResponse` **get** `/v1/app/setup/verifications/{verificationID}` Get the current state of a device verification transaction. ### Parameters - `verification_id: str` Verification ID. ### Returns - `class VerificationRetrieveResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) verification = client.app.verifications.retrieve( "x", ) print(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 `app.verifications.accept(strverification_id) -> VerificationAcceptResponse` **post** `/v1/app/setup/verifications/{verificationID}/accept` Accept an incoming device verification request. ### Parameters - `verification_id: str` Verification ID. ### Returns - `class VerificationAcceptResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.verifications.accept( "x", ) print(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 `app.verifications.cancel(strverification_id, VerificationCancelParams**kwargs) -> VerificationCancelResponse` **post** `/v1/app/setup/verifications/{verificationID}/cancel` Cancel an active device verification request. ### Parameters - `verification_id: str` Verification ID. - `code: Optional[str]` Optional cancellation code. - `reason: Optional[str]` Optional user-facing cancellation reason. ### Returns - `class VerificationCancelResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.verifications.cancel( verification_id="x", ) print(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 - `class VerificationListResponse: …` - `items: List[Item]` - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[ItemError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[ItemOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[ItemQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[ItemSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Verification Create Response - `class VerificationCreateResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Verification Retrieve Response - `class VerificationRetrieveResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Verification Accept Response - `class VerificationAcceptResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Verification Cancel Response - `class VerificationCancelResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. # Qr ## Scan verification QR code `app.verifications.qr.scan(QrScanParams**kwargs) -> QrScanResponse` **post** `/v1/app/setup/verifications/qr/scan` Submit the QR code scanned from another signed-in device. ### Parameters - `data: str` QR code payload scanned from the other device. ### Returns - `class QrScanResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.verifications.qr.scan( data="x", ) print(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 `app.verifications.qr.confirm_scanned(strverification_id) -> QrConfirmScannedResponse` **post** `/v1/app/setup/verifications/{verificationID}/qr/confirm-scanned` Confirm that another device scanned this device QR code. ### Parameters - `verification_id: str` Verification ID. ### Returns - `class QrConfirmScannedResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.verifications.qr.confirm_scanned( "x", ) print(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 - `class QrScanResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Qr Confirm Scanned Response - `class QrConfirmScannedResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. # SAS ## Start emoji verification `app.verifications.sas.start(strverification_id) -> SASStartResponse` **post** `/v1/app/setup/verifications/{verificationID}/sas/start` Start emoji comparison for device verification. ### Parameters - `verification_id: str` Verification ID. ### Returns - `class SASStartResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.verifications.sas.start( "x", ) print(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 `app.verifications.sas.confirm(strverification_id) -> SASConfirmResponse` **post** `/v1/app/setup/verifications/{verificationID}/sas/confirm` Confirm that the emoji or number sequence matches on both devices. ### Parameters - `verification_id: str` Verification ID. ### Returns - `class SASConfirmResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### Example ```python import os from beeper_desktop_api import BeeperDesktop client = BeeperDesktop( access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted ) response = client.app.verifications.sas.confirm( "x", ) print(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 - `class SASStartResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. ### SAS Confirm Response - `class SASConfirmResponse: …` - `session: Session` Current app sign-in and encrypted messaging setup state. - `e2ee: SessionE2EE` Encrypted messaging setup status. - `cross_signing: bool` Whether this account can verify trusted devices. - `first_sync_done: bool` Whether the first encrypted message sync is complete. - `has_backed_up_recovery_key: bool` Whether the user confirmed that they saved their recovery key. - `initialized: bool` Whether encrypted messaging setup has started. - `key_backup: bool` Whether encrypted message backup is available. - `secrets: SessionE2EESecrets` Encrypted messaging keys available on this device. - `master_key: bool` Whether the account identity key is available. - `megolm_backup_key: bool` Whether the encrypted message backup key is available. - `recovery_key: bool` Whether a recovery key is available. - `self_signing_key: bool` Whether the device trust key is available. - `user_signing_key: bool` Whether the user trust key is available. - `secret_storage: bool` Whether secure key storage is available. - `verified: bool` Whether this device is trusted for encrypted messages. - `recovery_key_generated_at: Optional[float]` Unix timestamp for when the recovery key was created. - `state: Literal["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: Optional[SessionMatrix]` Signed-in account details. Omitted until sign-in is complete. - `device_id: str` Current device ID. - `homeserver: str` Beeper homeserver URL for this account. - `user_id: str` Signed-in Beeper user ID. - `verification: Optional[SessionVerification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[SessionVerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[SessionVerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[SessionVerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[SessionVerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices. - `verification: Optional[Verification]` Trusted device verification progress. - `id: str` Verification ID to pass in verification action paths. - `available_actions: List[Literal["accept", "cancel", "qr.confirmScanned", 2 more]]` Verification actions that are valid for the current state. - `"accept"` - `"cancel"` - `"qr.confirmScanned"` - `"sas.start"` - `"sas.confirm"` - `direction: Literal["incoming", "outgoing"]` Whether this device started or received the verification. - `"incoming"` - `"outgoing"` - `methods: List[Literal["qr", "sas"]]` Verification methods supported for this transaction. - `"qr"` - `"sas"` - `purpose: Literal["login", "device"]` Why this verification exists. - `"login"` - `"device"` - `state: Literal["requested", "ready", "sas_ready", 4 more]` Current trusted-device verification state. - `"requested"` - `"ready"` - `"sas_ready"` - `"qr_scanned"` - `"done"` - `"cancelled"` - `"error"` - `error: Optional[VerificationError]` Verification error details, if verification stopped. - `code: str` Verification error code. - `reason: str` User-facing verification error message. - `other_device: Optional[VerificationOtherDevice]` Other device participating in verification. - `id: str` Other device ID. - `name: Optional[str]` Other device display name, if known. - `other_user_id: Optional[str]` Other Beeper user participating in verification. - `qr: Optional[VerificationQr]` QR verification data. - `data: str` QR code payload to display for verification. - `sas: Optional[VerificationSAS]` Emoji or number comparison data for verification. - `emojis: str` Emoji sequence to compare on both devices. - `decimals: Optional[str]` Number sequence to compare on both devices.