# Login ## Start Beeper app setup `client.App.Login.Start(ctx) (*AppLoginStartResponse, error)` **post** `/v1/app/setup/start` Start setting up Beeper Desktop or Beeper Server. The flow supports existing Beeper accounts and new account creation. ### Returns - `type AppLoginStartResponse struct{…}` - `SetupRequestID string` Setup request ID to use in the next sign-in step. - `SignInMethods []string` Available sign-in methods for this setup request. ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) response, err := client.App.Login.Start(context.TODO()) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.SetupRequestID) } ``` #### Response ```json { "setupRequestID": "setupRequestID", "signInMethods": [ "string" ] } ``` ## Send setup sign-in code `client.App.Login.Email(ctx, body) error` **post** `/v1/app/setup/email` Send a sign-in code to the user email address for app setup. ### Parameters - `body AppLoginEmailParams` - `Email param.Field[string]` Email address to send the sign-in code to. - `SetupRequestID param.Field[string]` Setup request ID returned by the start step. ### Example ```go package main import ( "context" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) err := client.App.Login.Email(context.TODO(), beeperdesktopapi.AppLoginEmailParams{ Email: "dev@stainless.com", SetupRequestID: "setupRequestID", }) if err != nil { panic(err.Error()) } } ``` ## Complete setup sign-in with code `client.App.Login.Response(ctx, body) (*AppLoginResponseResponseUnion, error)` **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 - `body AppLoginResponseParams` - `Response param.Field[string]` Sign-in code from the user email. - `SetupRequestID param.Field[string]` Setup request ID returned by the start step. ### Returns - `type AppLoginResponseResponseUnion interface{…}` - `type AppLoginResponseResponseSuccess struct{…}` - `Matrix AppLoginResponseResponseSuccessMatrix` Account credentials for first-party app setup. - `AccessToken string` Beeper account access token. Returned once for first-party app setup. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Session AppLoginResponseResponseSuccessSession` Current app sign-in and encrypted messaging setup state after sign-in. - `E2EE AppLoginResponseResponseSuccessSessionE2EE` Encrypted messaging setup status. - `CrossSigning bool` Whether this account can verify trusted devices. - `FirstSyncDone bool` Whether the first encrypted message sync is complete. - `HasBackedUpRecoveryKey bool` Whether the user confirmed that they saved their recovery key. - `Initialized bool` Whether encrypted messaging setup has started. - `KeyBackup bool` Whether encrypted message backup is available. - `Secrets AppLoginResponseResponseSuccessSessionE2EESecrets` Encrypted messaging keys available on this device. - `MasterKey bool` Whether the account identity key is available. - `MegolmBackupKey bool` Whether the encrypted message backup key is available. - `RecoveryKey bool` Whether a recovery key is available. - `SelfSigningKey bool` Whether the device trust key is available. - `UserSigningKey bool` Whether the user trust key is available. - `SecretStorage bool` Whether secure key storage is available. - `Verified bool` Whether this device is trusted for encrypted messages. - `RecoveryKeyGeneratedAt float64` Unix timestamp for when the recovery key was created. - `State string` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `const AppLoginResponseResponseSuccessSessionStateNeedsLogin AppLoginResponseResponseSuccessSessionState = "needs-login"` - `const AppLoginResponseResponseSuccessSessionStateInitializing AppLoginResponseResponseSuccessSessionState = "initializing"` - `const AppLoginResponseResponseSuccessSessionStateNeedsCrossSigningSetup AppLoginResponseResponseSuccessSessionState = "needs-cross-signing-setup"` - `const AppLoginResponseResponseSuccessSessionStateNeedsVerification AppLoginResponseResponseSuccessSessionState = "needs-verification"` - `const AppLoginResponseResponseSuccessSessionStateNeedsSecrets AppLoginResponseResponseSuccessSessionState = "needs-secrets"` - `const AppLoginResponseResponseSuccessSessionStateNeedsFirstSync AppLoginResponseResponseSuccessSessionState = "needs-first-sync"` - `const AppLoginResponseResponseSuccessSessionStateReady AppLoginResponseResponseSuccessSessionState = "ready"` - `Matrix AppLoginResponseResponseSuccessSessionMatrix` Signed-in account details. Omitted until sign-in is complete. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Verification AppLoginResponseResponseSuccessSessionVerification` Trusted device verification progress. - `ID string` Verification ID to pass in verification action paths. - `AvailableActions []string` Verification actions that are valid for the current state. - `const AppLoginResponseResponseSuccessSessionVerificationAvailableActionAccept AppLoginResponseResponseSuccessSessionVerificationAvailableAction = "accept"` - `const AppLoginResponseResponseSuccessSessionVerificationAvailableActionCancel AppLoginResponseResponseSuccessSessionVerificationAvailableAction = "cancel"` - `const AppLoginResponseResponseSuccessSessionVerificationAvailableActionQrConfirmScanned AppLoginResponseResponseSuccessSessionVerificationAvailableAction = "qr.confirmScanned"` - `const AppLoginResponseResponseSuccessSessionVerificationAvailableActionSASStart AppLoginResponseResponseSuccessSessionVerificationAvailableAction = "sas.start"` - `const AppLoginResponseResponseSuccessSessionVerificationAvailableActionSASConfirm AppLoginResponseResponseSuccessSessionVerificationAvailableAction = "sas.confirm"` - `Direction string` Whether this device started or received the verification. - `const AppLoginResponseResponseSuccessSessionVerificationDirectionIncoming AppLoginResponseResponseSuccessSessionVerificationDirection = "incoming"` - `const AppLoginResponseResponseSuccessSessionVerificationDirectionOutgoing AppLoginResponseResponseSuccessSessionVerificationDirection = "outgoing"` - `Methods []string` Verification methods supported for this transaction. - `const AppLoginResponseResponseSuccessSessionVerificationMethodQr AppLoginResponseResponseSuccessSessionVerificationMethod = "qr"` - `const AppLoginResponseResponseSuccessSessionVerificationMethodSAS AppLoginResponseResponseSuccessSessionVerificationMethod = "sas"` - `Purpose string` Why this verification exists. - `const AppLoginResponseResponseSuccessSessionVerificationPurposeLogin AppLoginResponseResponseSuccessSessionVerificationPurpose = "login"` - `const AppLoginResponseResponseSuccessSessionVerificationPurposeDevice AppLoginResponseResponseSuccessSessionVerificationPurpose = "device"` - `State string` Current trusted-device verification state. - `const AppLoginResponseResponseSuccessSessionVerificationStateRequested AppLoginResponseResponseSuccessSessionVerificationState = "requested"` - `const AppLoginResponseResponseSuccessSessionVerificationStateReady AppLoginResponseResponseSuccessSessionVerificationState = "ready"` - `const AppLoginResponseResponseSuccessSessionVerificationStateSASReady AppLoginResponseResponseSuccessSessionVerificationState = "sas_ready"` - `const AppLoginResponseResponseSuccessSessionVerificationStateQrScanned AppLoginResponseResponseSuccessSessionVerificationState = "qr_scanned"` - `const AppLoginResponseResponseSuccessSessionVerificationStateDone AppLoginResponseResponseSuccessSessionVerificationState = "done"` - `const AppLoginResponseResponseSuccessSessionVerificationStateCancelled AppLoginResponseResponseSuccessSessionVerificationState = "cancelled"` - `const AppLoginResponseResponseSuccessSessionVerificationStateError AppLoginResponseResponseSuccessSessionVerificationState = "error"` - `Error AppLoginResponseResponseSuccessSessionVerificationError` Verification error details, if verification stopped. - `Code string` Verification error code. - `Reason string` User-facing verification error message. - `OtherDevice AppLoginResponseResponseSuccessSessionVerificationOtherDevice` Other device participating in verification. - `ID string` Other device ID. - `Name string` Other device display name, if known. - `OtherUserID string` Other Beeper user participating in verification. - `Qr AppLoginResponseResponseSuccessSessionVerificationQr` QR verification data. - `Data string` QR code payload to display for verification. - `SAS AppLoginResponseResponseSuccessSessionVerificationSAS` Emoji or number comparison data for verification. - `Emojis string` Emoji sequence to compare on both devices. - `Decimals string` Number sequence to compare on both devices. - `type AppLoginResponseResponseRegistrationRequired struct{…}` - `Copy AppLoginResponseResponseRegistrationRequiredCopy` Copy to display during account creation. - `Submit Continue` Submit button label. - `const ContinueContinue Continue = "Continue"` - `Terms ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy` Terms and privacy notice to show before account creation. - `const ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicyByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy ByContinuingYouAgreeToTheTermsOfUseAndAcknowledgeThePrivacyPolicy = "By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."` - `Title ChooseYourUsername` Title for the username step. - `const ChooseYourUsernameChooseYourUsername ChooseYourUsername = "Choose your username"` - `UsernamePlaceholder Username` Placeholder for the username field. - `const UsernameUsername Username = "Username"` - `LeadToken string` Registration token returned by Beeper. - `RegistrationRequired bool` Indicates that the user needs to create a Beeper account. - `const AppLoginResponseResponseRegistrationRequiredRegistrationRequiredTrue AppLoginResponseResponseRegistrationRequiredRegistrationRequired = true` - `SetupRequestID string` Setup request ID to use when creating the account. - `UsernameSuggestions []string` Suggested usernames for the new account. ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) response, err := client.App.Login.Response(context.TODO(), beeperdesktopapi.AppLoginResponseParams{ Response: "response", SetupRequestID: "setupRequestID", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.App.Login.Register(ctx, body) (*AppLoginRegisterResponse, error)` **post** `/v1/app/setup/register` Create a Beeper account after the user chooses a username and accepts the Terms of Use. ### Parameters - `body AppLoginRegisterParams` - `AcceptTerms param.Field[bool]` 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). - `const AppLoginRegisterParamsAcceptTermsTrue AppLoginRegisterParamsAcceptTerms = true` - `LeadToken param.Field[string]` Registration token returned by Beeper. - `SetupRequestID param.Field[string]` Setup request ID returned by the start step. - `Username param.Field[string]` Username selected by the user. ### Returns - `type AppLoginRegisterResponse struct{…}` - `Matrix AppLoginRegisterResponseMatrix` Account credentials for first-party app setup. - `AccessToken string` Beeper account access token. Returned once for first-party app setup. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Session AppLoginRegisterResponseSession` Current app sign-in and encrypted messaging setup state after sign-in. - `E2EE AppLoginRegisterResponseSessionE2EE` Encrypted messaging setup status. - `CrossSigning bool` Whether this account can verify trusted devices. - `FirstSyncDone bool` Whether the first encrypted message sync is complete. - `HasBackedUpRecoveryKey bool` Whether the user confirmed that they saved their recovery key. - `Initialized bool` Whether encrypted messaging setup has started. - `KeyBackup bool` Whether encrypted message backup is available. - `Secrets AppLoginRegisterResponseSessionE2EESecrets` Encrypted messaging keys available on this device. - `MasterKey bool` Whether the account identity key is available. - `MegolmBackupKey bool` Whether the encrypted message backup key is available. - `RecoveryKey bool` Whether a recovery key is available. - `SelfSigningKey bool` Whether the device trust key is available. - `UserSigningKey bool` Whether the user trust key is available. - `SecretStorage bool` Whether secure key storage is available. - `Verified bool` Whether this device is trusted for encrypted messages. - `RecoveryKeyGeneratedAt float64` Unix timestamp for when the recovery key was created. - `State string` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `const AppLoginRegisterResponseSessionStateNeedsLogin AppLoginRegisterResponseSessionState = "needs-login"` - `const AppLoginRegisterResponseSessionStateInitializing AppLoginRegisterResponseSessionState = "initializing"` - `const AppLoginRegisterResponseSessionStateNeedsCrossSigningSetup AppLoginRegisterResponseSessionState = "needs-cross-signing-setup"` - `const AppLoginRegisterResponseSessionStateNeedsVerification AppLoginRegisterResponseSessionState = "needs-verification"` - `const AppLoginRegisterResponseSessionStateNeedsSecrets AppLoginRegisterResponseSessionState = "needs-secrets"` - `const AppLoginRegisterResponseSessionStateNeedsFirstSync AppLoginRegisterResponseSessionState = "needs-first-sync"` - `const AppLoginRegisterResponseSessionStateReady AppLoginRegisterResponseSessionState = "ready"` - `Matrix AppLoginRegisterResponseSessionMatrix` Signed-in account details. Omitted until sign-in is complete. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Verification AppLoginRegisterResponseSessionVerification` Trusted device verification progress. - `ID string` Verification ID to pass in verification action paths. - `AvailableActions []string` Verification actions that are valid for the current state. - `const AppLoginRegisterResponseSessionVerificationAvailableActionAccept AppLoginRegisterResponseSessionVerificationAvailableAction = "accept"` - `const AppLoginRegisterResponseSessionVerificationAvailableActionCancel AppLoginRegisterResponseSessionVerificationAvailableAction = "cancel"` - `const AppLoginRegisterResponseSessionVerificationAvailableActionQrConfirmScanned AppLoginRegisterResponseSessionVerificationAvailableAction = "qr.confirmScanned"` - `const AppLoginRegisterResponseSessionVerificationAvailableActionSASStart AppLoginRegisterResponseSessionVerificationAvailableAction = "sas.start"` - `const AppLoginRegisterResponseSessionVerificationAvailableActionSASConfirm AppLoginRegisterResponseSessionVerificationAvailableAction = "sas.confirm"` - `Direction string` Whether this device started or received the verification. - `const AppLoginRegisterResponseSessionVerificationDirectionIncoming AppLoginRegisterResponseSessionVerificationDirection = "incoming"` - `const AppLoginRegisterResponseSessionVerificationDirectionOutgoing AppLoginRegisterResponseSessionVerificationDirection = "outgoing"` - `Methods []string` Verification methods supported for this transaction. - `const AppLoginRegisterResponseSessionVerificationMethodQr AppLoginRegisterResponseSessionVerificationMethod = "qr"` - `const AppLoginRegisterResponseSessionVerificationMethodSAS AppLoginRegisterResponseSessionVerificationMethod = "sas"` - `Purpose string` Why this verification exists. - `const AppLoginRegisterResponseSessionVerificationPurposeLogin AppLoginRegisterResponseSessionVerificationPurpose = "login"` - `const AppLoginRegisterResponseSessionVerificationPurposeDevice AppLoginRegisterResponseSessionVerificationPurpose = "device"` - `State string` Current trusted-device verification state. - `const AppLoginRegisterResponseSessionVerificationStateRequested AppLoginRegisterResponseSessionVerificationState = "requested"` - `const AppLoginRegisterResponseSessionVerificationStateReady AppLoginRegisterResponseSessionVerificationState = "ready"` - `const AppLoginRegisterResponseSessionVerificationStateSASReady AppLoginRegisterResponseSessionVerificationState = "sas_ready"` - `const AppLoginRegisterResponseSessionVerificationStateQrScanned AppLoginRegisterResponseSessionVerificationState = "qr_scanned"` - `const AppLoginRegisterResponseSessionVerificationStateDone AppLoginRegisterResponseSessionVerificationState = "done"` - `const AppLoginRegisterResponseSessionVerificationStateCancelled AppLoginRegisterResponseSessionVerificationState = "cancelled"` - `const AppLoginRegisterResponseSessionVerificationStateError AppLoginRegisterResponseSessionVerificationState = "error"` - `Error AppLoginRegisterResponseSessionVerificationError` Verification error details, if verification stopped. - `Code string` Verification error code. - `Reason string` User-facing verification error message. - `OtherDevice AppLoginRegisterResponseSessionVerificationOtherDevice` Other device participating in verification. - `ID string` Other device ID. - `Name string` Other device display name, if known. - `OtherUserID string` Other Beeper user participating in verification. - `Qr AppLoginRegisterResponseSessionVerificationQr` QR verification data. - `Data string` QR code payload to display for verification. - `SAS AppLoginRegisterResponseSessionVerificationSAS` Emoji or number comparison data for verification. - `Emojis string` Emoji sequence to compare on both devices. - `Decimals string` Number sequence to compare on both devices. ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) response, err := client.App.Login.Register(context.TODO(), beeperdesktopapi.AppLoginRegisterParams{ AcceptTerms: true, LeadToken: "leadToken", SetupRequestID: "setupRequestID", Username: "x", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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" } } } } ``` # Verification # Recovery Key ## Verify with recovery key `client.App.Login.Verification.RecoveryKey.Verify(ctx, body) (*AppLoginVerificationRecoveryKeyVerifyResponse, error)` **post** `/v1/app/setup/verification/recovery-key` Unlock encrypted messages with the user recovery key. ### Parameters - `body AppLoginVerificationRecoveryKeyVerifyParams` - `RecoveryKey param.Field[string]` Recovery key saved by the user. ### Returns - `type AppLoginVerificationRecoveryKeyVerifyResponse struct{…}` - `Session AppLoginVerificationRecoveryKeyVerifyResponseSession` Current app sign-in and encrypted messaging setup state. - `E2EE AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EE` Encrypted messaging setup status. - `CrossSigning bool` Whether this account can verify trusted devices. - `FirstSyncDone bool` Whether the first encrypted message sync is complete. - `HasBackedUpRecoveryKey bool` Whether the user confirmed that they saved their recovery key. - `Initialized bool` Whether encrypted messaging setup has started. - `KeyBackup bool` Whether encrypted message backup is available. - `Secrets AppLoginVerificationRecoveryKeyVerifyResponseSessionE2EESecrets` Encrypted messaging keys available on this device. - `MasterKey bool` Whether the account identity key is available. - `MegolmBackupKey bool` Whether the encrypted message backup key is available. - `RecoveryKey bool` Whether a recovery key is available. - `SelfSigningKey bool` Whether the device trust key is available. - `UserSigningKey bool` Whether the user trust key is available. - `SecretStorage bool` Whether secure key storage is available. - `Verified bool` Whether this device is trusted for encrypted messages. - `RecoveryKeyGeneratedAt float64` Unix timestamp for when the recovery key was created. - `State string` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateNeedsLogin AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "needs-login"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateInitializing AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "initializing"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateNeedsCrossSigningSetup AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "needs-cross-signing-setup"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateNeedsVerification AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "needs-verification"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateNeedsSecrets AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "needs-secrets"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateNeedsFirstSync AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "needs-first-sync"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionStateReady AppLoginVerificationRecoveryKeyVerifyResponseSessionState = "ready"` - `Matrix AppLoginVerificationRecoveryKeyVerifyResponseSessionMatrix` Signed-in account details. Omitted until sign-in is complete. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Verification AppLoginVerificationRecoveryKeyVerifyResponseSessionVerification` Trusted device verification progress. - `ID string` Verification ID to pass in verification action paths. - `AvailableActions []string` Verification actions that are valid for the current state. - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableActionAccept AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "accept"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableActionCancel AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "cancel"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableActionQrConfirmScanned AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "qr.confirmScanned"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableActionSASStart AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "sas.start"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableActionSASConfirm AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "sas.confirm"` - `Direction string` Whether this device started or received the verification. - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationDirectionIncoming AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationDirection = "incoming"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationDirectionOutgoing AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationDirection = "outgoing"` - `Methods []string` Verification methods supported for this transaction. - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationMethodQr AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationMethod = "qr"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationMethodSAS AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationMethod = "sas"` - `Purpose string` Why this verification exists. - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationPurposeLogin AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationPurpose = "login"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationPurposeDevice AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationPurpose = "device"` - `State string` Current trusted-device verification state. - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateRequested AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "requested"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateReady AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "ready"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateSASReady AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "sas_ready"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateQrScanned AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "qr_scanned"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateDone AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "done"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateCancelled AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "cancelled"` - `const AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationStateError AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationState = "error"` - `Error AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationError` Verification error details, if verification stopped. - `Code string` Verification error code. - `Reason string` User-facing verification error message. - `OtherDevice AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationOtherDevice` Other device participating in verification. - `ID string` Other device ID. - `Name string` Other device display name, if known. - `OtherUserID string` Other Beeper user participating in verification. - `Qr AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationQr` QR verification data. - `Data string` QR code payload to display for verification. - `SAS AppLoginVerificationRecoveryKeyVerifyResponseSessionVerificationSAS` Emoji or number comparison data for verification. - `Emojis string` Emoji sequence to compare on both devices. - `Decimals string` Number sequence to compare on both devices. ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) response, err := client.App.Login.Verification.RecoveryKey.Verify(context.TODO(), beeperdesktopapi.AppLoginVerificationRecoveryKeyVerifyParams{ RecoveryKey: "x", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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" } } } } ``` # Reset ## Create new recovery key `client.App.Login.Verification.RecoveryKey.Reset.New(ctx, body) (*AppLoginVerificationRecoveryKeyResetNewResponse, error)` **post** `/v1/app/setup/verification/recovery-key/reset` Create a new recovery key when the user cannot use the existing one. ### Parameters - `body AppLoginVerificationRecoveryKeyResetNewParams` - `ExistingRecoveryKey param.Field[string]` Existing recovery key, if the user has it. ### Returns - `type AppLoginVerificationRecoveryKeyResetNewResponse struct{…}` - `RecoveryKey string` New recovery key. Show it once and ask the user to save it. - `Session AppLoginVerificationRecoveryKeyResetNewResponseSession` Current app sign-in and encrypted messaging setup state after creating the new recovery key. - `E2EE AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EE` Encrypted messaging setup status. - `CrossSigning bool` Whether this account can verify trusted devices. - `FirstSyncDone bool` Whether the first encrypted message sync is complete. - `HasBackedUpRecoveryKey bool` Whether the user confirmed that they saved their recovery key. - `Initialized bool` Whether encrypted messaging setup has started. - `KeyBackup bool` Whether encrypted message backup is available. - `Secrets AppLoginVerificationRecoveryKeyResetNewResponseSessionE2EESecrets` Encrypted messaging keys available on this device. - `MasterKey bool` Whether the account identity key is available. - `MegolmBackupKey bool` Whether the encrypted message backup key is available. - `RecoveryKey bool` Whether a recovery key is available. - `SelfSigningKey bool` Whether the device trust key is available. - `UserSigningKey bool` Whether the user trust key is available. - `SecretStorage bool` Whether secure key storage is available. - `Verified bool` Whether this device is trusted for encrypted messages. - `RecoveryKeyGeneratedAt float64` Unix timestamp for when the recovery key was created. - `State string` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateNeedsLogin AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "needs-login"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateInitializing AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "initializing"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateNeedsCrossSigningSetup AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "needs-cross-signing-setup"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateNeedsVerification AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "needs-verification"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateNeedsSecrets AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "needs-secrets"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateNeedsFirstSync AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "needs-first-sync"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionStateReady AppLoginVerificationRecoveryKeyResetNewResponseSessionState = "ready"` - `Matrix AppLoginVerificationRecoveryKeyResetNewResponseSessionMatrix` Signed-in account details. Omitted until sign-in is complete. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Verification AppLoginVerificationRecoveryKeyResetNewResponseSessionVerification` Trusted device verification progress. - `ID string` Verification ID to pass in verification action paths. - `AvailableActions []string` Verification actions that are valid for the current state. - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableActionAccept AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "accept"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableActionCancel AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "cancel"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableActionQrConfirmScanned AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "qr.confirmScanned"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableActionSASStart AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "sas.start"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableActionSASConfirm AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "sas.confirm"` - `Direction string` Whether this device started or received the verification. - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationDirectionIncoming AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationDirection = "incoming"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationDirectionOutgoing AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationDirection = "outgoing"` - `Methods []string` Verification methods supported for this transaction. - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationMethodQr AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationMethod = "qr"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationMethodSAS AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationMethod = "sas"` - `Purpose string` Why this verification exists. - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationPurposeLogin AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationPurpose = "login"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationPurposeDevice AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationPurpose = "device"` - `State string` Current trusted-device verification state. - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateRequested AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "requested"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateReady AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "ready"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateSASReady AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "sas_ready"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateQrScanned AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "qr_scanned"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateDone AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "done"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateCancelled AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "cancelled"` - `const AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationStateError AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationState = "error"` - `Error AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationError` Verification error details, if verification stopped. - `Code string` Verification error code. - `Reason string` User-facing verification error message. - `OtherDevice AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationOtherDevice` Other device participating in verification. - `ID string` Other device ID. - `Name string` Other device display name, if known. - `OtherUserID string` Other Beeper user participating in verification. - `Qr AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationQr` QR verification data. - `Data string` QR code payload to display for verification. - `SAS AppLoginVerificationRecoveryKeyResetNewResponseSessionVerificationSAS` Emoji or number comparison data for verification. - `Emojis string` Emoji sequence to compare on both devices. - `Decimals string` Number sequence to compare on both devices. ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) reset, err := client.App.Login.Verification.RecoveryKey.Reset.New(context.TODO(), beeperdesktopapi.AppLoginVerificationRecoveryKeyResetNewParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", reset.RecoveryKey) } ``` #### 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 `client.App.Login.Verification.RecoveryKey.Reset.Confirm(ctx, body) (*AppLoginVerificationRecoveryKeyResetConfirmResponse, error)` **post** `/v1/app/setup/verification/recovery-key/reset/confirm` Confirm that the new recovery key should be used for this account. ### Parameters - `body AppLoginVerificationRecoveryKeyResetConfirmParams` - `RecoveryKey param.Field[string]` New recovery key returned by the reset step. ### Returns - `type AppLoginVerificationRecoveryKeyResetConfirmResponse struct{…}` - `Session AppLoginVerificationRecoveryKeyResetConfirmResponseSession` Current app sign-in and encrypted messaging setup state. - `E2EE AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EE` Encrypted messaging setup status. - `CrossSigning bool` Whether this account can verify trusted devices. - `FirstSyncDone bool` Whether the first encrypted message sync is complete. - `HasBackedUpRecoveryKey bool` Whether the user confirmed that they saved their recovery key. - `Initialized bool` Whether encrypted messaging setup has started. - `KeyBackup bool` Whether encrypted message backup is available. - `Secrets AppLoginVerificationRecoveryKeyResetConfirmResponseSessionE2EESecrets` Encrypted messaging keys available on this device. - `MasterKey bool` Whether the account identity key is available. - `MegolmBackupKey bool` Whether the encrypted message backup key is available. - `RecoveryKey bool` Whether a recovery key is available. - `SelfSigningKey bool` Whether the device trust key is available. - `UserSigningKey bool` Whether the user trust key is available. - `SecretStorage bool` Whether secure key storage is available. - `Verified bool` Whether this device is trusted for encrypted messages. - `RecoveryKeyGeneratedAt float64` Unix timestamp for when the recovery key was created. - `State string` Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server. - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateNeedsLogin AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "needs-login"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateInitializing AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "initializing"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateNeedsCrossSigningSetup AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "needs-cross-signing-setup"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateNeedsVerification AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "needs-verification"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateNeedsSecrets AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "needs-secrets"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateNeedsFirstSync AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "needs-first-sync"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionStateReady AppLoginVerificationRecoveryKeyResetConfirmResponseSessionState = "ready"` - `Matrix AppLoginVerificationRecoveryKeyResetConfirmResponseSessionMatrix` Signed-in account details. Omitted until sign-in is complete. - `DeviceID string` Current device ID. - `Homeserver string` Beeper homeserver URL for this account. - `UserID string` Signed-in Beeper user ID. - `Verification AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerification` Trusted device verification progress. - `ID string` Verification ID to pass in verification action paths. - `AvailableActions []string` Verification actions that are valid for the current state. - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionAccept AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "accept"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionCancel AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "cancel"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionQrConfirmScanned AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "qr.confirmScanned"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionSASStart AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "sas.start"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionSASConfirm AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "sas.confirm"` - `Direction string` Whether this device started or received the verification. - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationDirectionIncoming AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationDirection = "incoming"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationDirectionOutgoing AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationDirection = "outgoing"` - `Methods []string` Verification methods supported for this transaction. - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationMethodQr AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationMethod = "qr"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationMethodSAS AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationMethod = "sas"` - `Purpose string` Why this verification exists. - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationPurposeLogin AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationPurpose = "login"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationPurposeDevice AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationPurpose = "device"` - `State string` Current trusted-device verification state. - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateRequested AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "requested"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateReady AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "ready"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateSASReady AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "sas_ready"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateQrScanned AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "qr_scanned"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateDone AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "done"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateCancelled AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "cancelled"` - `const AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationStateError AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationState = "error"` - `Error AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationError` Verification error details, if verification stopped. - `Code string` Verification error code. - `Reason string` User-facing verification error message. - `OtherDevice AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice` Other device participating in verification. - `ID string` Other device ID. - `Name string` Other device display name, if known. - `OtherUserID string` Other Beeper user participating in verification. - `Qr AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationQr` QR verification data. - `Data string` QR code payload to display for verification. - `SAS AppLoginVerificationRecoveryKeyResetConfirmResponseSessionVerificationSAS` Emoji or number comparison data for verification. - `Emojis string` Emoji sequence to compare on both devices. - `Decimals string` Number sequence to compare on both devices. ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) response, err := client.App.Login.Verification.RecoveryKey.Reset.Confirm(context.TODO(), beeperdesktopapi.AppLoginVerificationRecoveryKeyResetConfirmParams{ RecoveryKey: "x", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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" } } } } ```