# Setup

## Get Beeper app setup state

`client.App.Setup.Get(ctx) (*AppSetupGetResponse, error)`

**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

- `type AppSetupGetResponse struct{…}`

  - `E2EE AppSetupGetResponseE2EE`

    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 AppSetupGetResponseE2EESecrets`

      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 AppSetupGetResponseState`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `const AppSetupGetResponseStateNeedsLogin AppSetupGetResponseState = "needs-login"`

    - `const AppSetupGetResponseStateInitializing AppSetupGetResponseState = "initializing"`

    - `const AppSetupGetResponseStateNeedsCrossSigningSetup AppSetupGetResponseState = "needs-cross-signing-setup"`

    - `const AppSetupGetResponseStateNeedsVerification AppSetupGetResponseState = "needs-verification"`

    - `const AppSetupGetResponseStateNeedsSecrets AppSetupGetResponseState = "needs-secrets"`

    - `const AppSetupGetResponseStateNeedsFirstSync AppSetupGetResponseState = "needs-first-sync"`

    - `const AppSetupGetResponseStateReady AppSetupGetResponseState = "ready"`

  - `Matrix AppSetupGetResponseMatrix`

    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 AppSetupGetResponseVerification`

    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 AppSetupGetResponseVerificationAvailableActionAccept AppSetupGetResponseVerificationAvailableAction = "accept"`

      - `const AppSetupGetResponseVerificationAvailableActionCancel AppSetupGetResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupGetResponseVerificationAvailableActionQRConfirmScanned AppSetupGetResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupGetResponseVerificationAvailableActionSASStart AppSetupGetResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupGetResponseVerificationAvailableActionSASConfirm AppSetupGetResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupGetResponseVerificationDirectionIncoming AppSetupGetResponseVerificationDirection = "incoming"`

      - `const AppSetupGetResponseVerificationDirectionOutgoing AppSetupGetResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupGetResponseVerificationMethodQR AppSetupGetResponseVerificationMethod = "qr"`

      - `const AppSetupGetResponseVerificationMethodSAS AppSetupGetResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupGetResponseVerificationPurposeLogin AppSetupGetResponseVerificationPurpose = "login"`

      - `const AppSetupGetResponseVerificationPurposeDevice AppSetupGetResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupGetResponseVerificationStateRequested AppSetupGetResponseVerificationState = "requested"`

      - `const AppSetupGetResponseVerificationStateReady AppSetupGetResponseVerificationState = "ready"`

      - `const AppSetupGetResponseVerificationStateSASReady AppSetupGetResponseVerificationState = "sas_ready"`

      - `const AppSetupGetResponseVerificationStateQRScanned AppSetupGetResponseVerificationState = "qr_scanned"`

      - `const AppSetupGetResponseVerificationStateDone AppSetupGetResponseVerificationState = "done"`

      - `const AppSetupGetResponseVerificationStateCancelled AppSetupGetResponseVerificationState = "cancelled"`

      - `const AppSetupGetResponseVerificationStateError AppSetupGetResponseVerificationState = "error"`

    - `Error AppSetupGetResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupGetResponseVerificationOtherDevice`

      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 AppSetupGetResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupGetResponseVerificationSAS`

      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"),
  )
  setup, err := client.App.Setup.Get(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", setup.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"
    }
  }
}
```

## Start Beeper app setup

`client.App.Setup.Start(ctx) (*AppSetupStartResponse, 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 AppSetupStartResponse 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.Setup.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.Setup.Email(ctx, body) error`

**post** `/v1/app/setup/email`

Send a sign-in code to the user email address for app setup.

### Parameters

- `body AppSetupEmailParams`

  - `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.Setup.Email(context.TODO(), beeperdesktopapi.AppSetupEmailParams{
    Email: "dev@stainless.com",
    SetupRequestID: "setupRequestID",
  })
  if err != nil {
    panic(err.Error())
  }
}
```

## Complete setup sign-in with code

`client.App.Setup.Response(ctx, body) (*AppSetupResponseResponseUnion, 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 AppSetupResponseParams`

  - `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 AppSetupResponseResponseUnion interface{…}`

  - `type AppSetupResponseResponseSuccess struct{…}`

    - `Matrix AppSetupResponseResponseSuccessMatrix`

      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 AppSetupResponseResponseSuccessSession`

      Current app sign-in and encrypted messaging setup state after sign-in.

      - `E2EE AppSetupResponseResponseSuccessSessionE2EE`

        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 AppSetupResponseResponseSuccessSessionE2EESecrets`

          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 AppSetupResponseResponseSuccessSessionStateNeedsLogin AppSetupResponseResponseSuccessSessionState = "needs-login"`

        - `const AppSetupResponseResponseSuccessSessionStateInitializing AppSetupResponseResponseSuccessSessionState = "initializing"`

        - `const AppSetupResponseResponseSuccessSessionStateNeedsCrossSigningSetup AppSetupResponseResponseSuccessSessionState = "needs-cross-signing-setup"`

        - `const AppSetupResponseResponseSuccessSessionStateNeedsVerification AppSetupResponseResponseSuccessSessionState = "needs-verification"`

        - `const AppSetupResponseResponseSuccessSessionStateNeedsSecrets AppSetupResponseResponseSuccessSessionState = "needs-secrets"`

        - `const AppSetupResponseResponseSuccessSessionStateNeedsFirstSync AppSetupResponseResponseSuccessSessionState = "needs-first-sync"`

        - `const AppSetupResponseResponseSuccessSessionStateReady AppSetupResponseResponseSuccessSessionState = "ready"`

      - `Matrix AppSetupResponseResponseSuccessSessionMatrix`

        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 AppSetupResponseResponseSuccessSessionVerification`

        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 AppSetupResponseResponseSuccessSessionVerificationAvailableActionAccept AppSetupResponseResponseSuccessSessionVerificationAvailableAction = "accept"`

          - `const AppSetupResponseResponseSuccessSessionVerificationAvailableActionCancel AppSetupResponseResponseSuccessSessionVerificationAvailableAction = "cancel"`

          - `const AppSetupResponseResponseSuccessSessionVerificationAvailableActionQRConfirmScanned AppSetupResponseResponseSuccessSessionVerificationAvailableAction = "qr.confirmScanned"`

          - `const AppSetupResponseResponseSuccessSessionVerificationAvailableActionSASStart AppSetupResponseResponseSuccessSessionVerificationAvailableAction = "sas.start"`

          - `const AppSetupResponseResponseSuccessSessionVerificationAvailableActionSASConfirm AppSetupResponseResponseSuccessSessionVerificationAvailableAction = "sas.confirm"`

        - `Direction string`

          Whether this device started or received the verification.

          - `const AppSetupResponseResponseSuccessSessionVerificationDirectionIncoming AppSetupResponseResponseSuccessSessionVerificationDirection = "incoming"`

          - `const AppSetupResponseResponseSuccessSessionVerificationDirectionOutgoing AppSetupResponseResponseSuccessSessionVerificationDirection = "outgoing"`

        - `Methods []string`

          Verification methods supported for this transaction.

          - `const AppSetupResponseResponseSuccessSessionVerificationMethodQR AppSetupResponseResponseSuccessSessionVerificationMethod = "qr"`

          - `const AppSetupResponseResponseSuccessSessionVerificationMethodSAS AppSetupResponseResponseSuccessSessionVerificationMethod = "sas"`

        - `Purpose string`

          Why this verification exists.

          - `const AppSetupResponseResponseSuccessSessionVerificationPurposeLogin AppSetupResponseResponseSuccessSessionVerificationPurpose = "login"`

          - `const AppSetupResponseResponseSuccessSessionVerificationPurposeDevice AppSetupResponseResponseSuccessSessionVerificationPurpose = "device"`

        - `State string`

          Current trusted-device verification state.

          - `const AppSetupResponseResponseSuccessSessionVerificationStateRequested AppSetupResponseResponseSuccessSessionVerificationState = "requested"`

          - `const AppSetupResponseResponseSuccessSessionVerificationStateReady AppSetupResponseResponseSuccessSessionVerificationState = "ready"`

          - `const AppSetupResponseResponseSuccessSessionVerificationStateSASReady AppSetupResponseResponseSuccessSessionVerificationState = "sas_ready"`

          - `const AppSetupResponseResponseSuccessSessionVerificationStateQRScanned AppSetupResponseResponseSuccessSessionVerificationState = "qr_scanned"`

          - `const AppSetupResponseResponseSuccessSessionVerificationStateDone AppSetupResponseResponseSuccessSessionVerificationState = "done"`

          - `const AppSetupResponseResponseSuccessSessionVerificationStateCancelled AppSetupResponseResponseSuccessSessionVerificationState = "cancelled"`

          - `const AppSetupResponseResponseSuccessSessionVerificationStateError AppSetupResponseResponseSuccessSessionVerificationState = "error"`

        - `Error AppSetupResponseResponseSuccessSessionVerificationError`

          Verification error details, if verification stopped.

          - `Code string`

            Verification error code.

          - `Reason string`

            User-facing verification error message.

        - `OtherDevice AppSetupResponseResponseSuccessSessionVerificationOtherDevice`

          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 AppSetupResponseResponseSuccessSessionVerificationQR`

          QR verification data.

          - `Data string`

            QR code payload to display for verification.

        - `SAS AppSetupResponseResponseSuccessSessionVerificationSAS`

          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 AppSetupResponseResponseRegistrationRequired struct{…}`

    - `Copy AppSetupResponseResponseRegistrationRequiredCopy`

      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 AppSetupResponseResponseRegistrationRequiredRegistrationRequiredTrue AppSetupResponseResponseRegistrationRequiredRegistrationRequired = 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.Setup.Response(context.TODO(), beeperdesktopapi.AppSetupResponseParams{
    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.Setup.Register(ctx, body) (*AppSetupRegisterResponse, error)`

**post** `/v1/app/setup/register`

Create a Beeper account after the user chooses a username and accepts the Terms of Use.

### Parameters

- `body AppSetupRegisterParams`

  - `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 AppSetupRegisterParamsAcceptTermsTrue AppSetupRegisterParamsAcceptTerms = 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 AppSetupRegisterResponse struct{…}`

  - `Matrix AppSetupRegisterResponseMatrix`

    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 AppSetupRegisterResponseSession`

    Current app sign-in and encrypted messaging setup state after sign-in.

    - `E2EE AppSetupRegisterResponseSessionE2EE`

      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 AppSetupRegisterResponseSessionE2EESecrets`

        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 AppSetupRegisterResponseSessionStateNeedsLogin AppSetupRegisterResponseSessionState = "needs-login"`

      - `const AppSetupRegisterResponseSessionStateInitializing AppSetupRegisterResponseSessionState = "initializing"`

      - `const AppSetupRegisterResponseSessionStateNeedsCrossSigningSetup AppSetupRegisterResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupRegisterResponseSessionStateNeedsVerification AppSetupRegisterResponseSessionState = "needs-verification"`

      - `const AppSetupRegisterResponseSessionStateNeedsSecrets AppSetupRegisterResponseSessionState = "needs-secrets"`

      - `const AppSetupRegisterResponseSessionStateNeedsFirstSync AppSetupRegisterResponseSessionState = "needs-first-sync"`

      - `const AppSetupRegisterResponseSessionStateReady AppSetupRegisterResponseSessionState = "ready"`

    - `Matrix AppSetupRegisterResponseSessionMatrix`

      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 AppSetupRegisterResponseSessionVerification`

      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 AppSetupRegisterResponseSessionVerificationAvailableActionAccept AppSetupRegisterResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupRegisterResponseSessionVerificationAvailableActionCancel AppSetupRegisterResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupRegisterResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupRegisterResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupRegisterResponseSessionVerificationAvailableActionSASStart AppSetupRegisterResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupRegisterResponseSessionVerificationAvailableActionSASConfirm AppSetupRegisterResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupRegisterResponseSessionVerificationDirectionIncoming AppSetupRegisterResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupRegisterResponseSessionVerificationDirectionOutgoing AppSetupRegisterResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupRegisterResponseSessionVerificationMethodQR AppSetupRegisterResponseSessionVerificationMethod = "qr"`

        - `const AppSetupRegisterResponseSessionVerificationMethodSAS AppSetupRegisterResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupRegisterResponseSessionVerificationPurposeLogin AppSetupRegisterResponseSessionVerificationPurpose = "login"`

        - `const AppSetupRegisterResponseSessionVerificationPurposeDevice AppSetupRegisterResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupRegisterResponseSessionVerificationStateRequested AppSetupRegisterResponseSessionVerificationState = "requested"`

        - `const AppSetupRegisterResponseSessionVerificationStateReady AppSetupRegisterResponseSessionVerificationState = "ready"`

        - `const AppSetupRegisterResponseSessionVerificationStateSASReady AppSetupRegisterResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupRegisterResponseSessionVerificationStateQRScanned AppSetupRegisterResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupRegisterResponseSessionVerificationStateDone AppSetupRegisterResponseSessionVerificationState = "done"`

        - `const AppSetupRegisterResponseSessionVerificationStateCancelled AppSetupRegisterResponseSessionVerificationState = "cancelled"`

        - `const AppSetupRegisterResponseSessionVerificationStateError AppSetupRegisterResponseSessionVerificationState = "error"`

      - `Error AppSetupRegisterResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupRegisterResponseSessionVerificationOtherDevice`

        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 AppSetupRegisterResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupRegisterResponseSessionVerificationSAS`

        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.Setup.Register(context.TODO(), beeperdesktopapi.AppSetupRegisterParams{
    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"
      }
    }
  }
}
```

# Recovery Key

## Verify with recovery key

`client.App.Setup.RecoveryKey.Verify(ctx, body) (*AppSetupRecoveryKeyVerifyResponse, error)`

**post** `/v1/app/setup/verification/recovery-key`

Unlock encrypted messages with the user recovery key.

### Parameters

- `body AppSetupRecoveryKeyVerifyParams`

  - `RecoveryKey param.Field[string]`

    Recovery key saved by the user.

### Returns

- `type AppSetupRecoveryKeyVerifyResponse struct{…}`

  - `Session AppSetupRecoveryKeyVerifyResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupRecoveryKeyVerifyResponseSessionE2EE`

      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 AppSetupRecoveryKeyVerifyResponseSessionE2EESecrets`

        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 AppSetupRecoveryKeyVerifyResponseSessionStateNeedsLogin AppSetupRecoveryKeyVerifyResponseSessionState = "needs-login"`

      - `const AppSetupRecoveryKeyVerifyResponseSessionStateInitializing AppSetupRecoveryKeyVerifyResponseSessionState = "initializing"`

      - `const AppSetupRecoveryKeyVerifyResponseSessionStateNeedsCrossSigningSetup AppSetupRecoveryKeyVerifyResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupRecoveryKeyVerifyResponseSessionStateNeedsVerification AppSetupRecoveryKeyVerifyResponseSessionState = "needs-verification"`

      - `const AppSetupRecoveryKeyVerifyResponseSessionStateNeedsSecrets AppSetupRecoveryKeyVerifyResponseSessionState = "needs-secrets"`

      - `const AppSetupRecoveryKeyVerifyResponseSessionStateNeedsFirstSync AppSetupRecoveryKeyVerifyResponseSessionState = "needs-first-sync"`

      - `const AppSetupRecoveryKeyVerifyResponseSessionStateReady AppSetupRecoveryKeyVerifyResponseSessionState = "ready"`

    - `Matrix AppSetupRecoveryKeyVerifyResponseSessionMatrix`

      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 AppSetupRecoveryKeyVerifyResponseSessionVerification`

      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 AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableActionAccept AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableActionCancel AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableActionSASStart AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableActionSASConfirm AppSetupRecoveryKeyVerifyResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationDirectionIncoming AppSetupRecoveryKeyVerifyResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationDirectionOutgoing AppSetupRecoveryKeyVerifyResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationMethodQR AppSetupRecoveryKeyVerifyResponseSessionVerificationMethod = "qr"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationMethodSAS AppSetupRecoveryKeyVerifyResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationPurposeLogin AppSetupRecoveryKeyVerifyResponseSessionVerificationPurpose = "login"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationPurposeDevice AppSetupRecoveryKeyVerifyResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateRequested AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "requested"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateReady AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "ready"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateSASReady AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateQRScanned AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateDone AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "done"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateCancelled AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "cancelled"`

        - `const AppSetupRecoveryKeyVerifyResponseSessionVerificationStateError AppSetupRecoveryKeyVerifyResponseSessionVerificationState = "error"`

      - `Error AppSetupRecoveryKeyVerifyResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupRecoveryKeyVerifyResponseSessionVerificationOtherDevice`

        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 AppSetupRecoveryKeyVerifyResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupRecoveryKeyVerifyResponseSessionVerificationSAS`

        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.Setup.RecoveryKey.Verify(context.TODO(), beeperdesktopapi.AppSetupRecoveryKeyVerifyParams{
    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.Setup.RecoveryKey.Reset.New(ctx, body) (*AppSetupRecoveryKeyResetNewResponse, error)`

**post** `/v1/app/setup/verification/recovery-key/reset`

Create a new recovery key when the user cannot use the existing one.

### Parameters

- `body AppSetupRecoveryKeyResetNewParams`

  - `ExistingRecoveryKey param.Field[string]`

    Existing recovery key, if the user has it.

### Returns

- `type AppSetupRecoveryKeyResetNewResponse struct{…}`

  - `RecoveryKey string`

    New recovery key. Show it once and ask the user to save it.

  - `Session AppSetupRecoveryKeyResetNewResponseSession`

    Current app sign-in and encrypted messaging setup state after creating the new recovery key.

    - `E2EE AppSetupRecoveryKeyResetNewResponseSessionE2EE`

      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 AppSetupRecoveryKeyResetNewResponseSessionE2EESecrets`

        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 AppSetupRecoveryKeyResetNewResponseSessionStateNeedsLogin AppSetupRecoveryKeyResetNewResponseSessionState = "needs-login"`

      - `const AppSetupRecoveryKeyResetNewResponseSessionStateInitializing AppSetupRecoveryKeyResetNewResponseSessionState = "initializing"`

      - `const AppSetupRecoveryKeyResetNewResponseSessionStateNeedsCrossSigningSetup AppSetupRecoveryKeyResetNewResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupRecoveryKeyResetNewResponseSessionStateNeedsVerification AppSetupRecoveryKeyResetNewResponseSessionState = "needs-verification"`

      - `const AppSetupRecoveryKeyResetNewResponseSessionStateNeedsSecrets AppSetupRecoveryKeyResetNewResponseSessionState = "needs-secrets"`

      - `const AppSetupRecoveryKeyResetNewResponseSessionStateNeedsFirstSync AppSetupRecoveryKeyResetNewResponseSessionState = "needs-first-sync"`

      - `const AppSetupRecoveryKeyResetNewResponseSessionStateReady AppSetupRecoveryKeyResetNewResponseSessionState = "ready"`

    - `Matrix AppSetupRecoveryKeyResetNewResponseSessionMatrix`

      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 AppSetupRecoveryKeyResetNewResponseSessionVerification`

      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 AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableActionAccept AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableActionCancel AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableActionSASStart AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableActionSASConfirm AppSetupRecoveryKeyResetNewResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationDirectionIncoming AppSetupRecoveryKeyResetNewResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationDirectionOutgoing AppSetupRecoveryKeyResetNewResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationMethodQR AppSetupRecoveryKeyResetNewResponseSessionVerificationMethod = "qr"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationMethodSAS AppSetupRecoveryKeyResetNewResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationPurposeLogin AppSetupRecoveryKeyResetNewResponseSessionVerificationPurpose = "login"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationPurposeDevice AppSetupRecoveryKeyResetNewResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateRequested AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "requested"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateReady AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "ready"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateSASReady AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateQRScanned AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateDone AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "done"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateCancelled AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "cancelled"`

        - `const AppSetupRecoveryKeyResetNewResponseSessionVerificationStateError AppSetupRecoveryKeyResetNewResponseSessionVerificationState = "error"`

      - `Error AppSetupRecoveryKeyResetNewResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupRecoveryKeyResetNewResponseSessionVerificationOtherDevice`

        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 AppSetupRecoveryKeyResetNewResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupRecoveryKeyResetNewResponseSessionVerificationSAS`

        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.Setup.RecoveryKey.Reset.New(context.TODO(), beeperdesktopapi.AppSetupRecoveryKeyResetNewParams{

  })
  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.Setup.RecoveryKey.Reset.Confirm(ctx, body) (*AppSetupRecoveryKeyResetConfirmResponse, error)`

**post** `/v1/app/setup/verification/recovery-key/reset/confirm`

Confirm that the new recovery key should be used for this account.

### Parameters

- `body AppSetupRecoveryKeyResetConfirmParams`

  - `RecoveryKey param.Field[string]`

    New recovery key returned by the reset step.

### Returns

- `type AppSetupRecoveryKeyResetConfirmResponse struct{…}`

  - `Session AppSetupRecoveryKeyResetConfirmResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupRecoveryKeyResetConfirmResponseSessionE2EE`

      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 AppSetupRecoveryKeyResetConfirmResponseSessionE2EESecrets`

        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 AppSetupRecoveryKeyResetConfirmResponseSessionStateNeedsLogin AppSetupRecoveryKeyResetConfirmResponseSessionState = "needs-login"`

      - `const AppSetupRecoveryKeyResetConfirmResponseSessionStateInitializing AppSetupRecoveryKeyResetConfirmResponseSessionState = "initializing"`

      - `const AppSetupRecoveryKeyResetConfirmResponseSessionStateNeedsCrossSigningSetup AppSetupRecoveryKeyResetConfirmResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupRecoveryKeyResetConfirmResponseSessionStateNeedsVerification AppSetupRecoveryKeyResetConfirmResponseSessionState = "needs-verification"`

      - `const AppSetupRecoveryKeyResetConfirmResponseSessionStateNeedsSecrets AppSetupRecoveryKeyResetConfirmResponseSessionState = "needs-secrets"`

      - `const AppSetupRecoveryKeyResetConfirmResponseSessionStateNeedsFirstSync AppSetupRecoveryKeyResetConfirmResponseSessionState = "needs-first-sync"`

      - `const AppSetupRecoveryKeyResetConfirmResponseSessionStateReady AppSetupRecoveryKeyResetConfirmResponseSessionState = "ready"`

    - `Matrix AppSetupRecoveryKeyResetConfirmResponseSessionMatrix`

      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 AppSetupRecoveryKeyResetConfirmResponseSessionVerification`

      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 AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionAccept AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionCancel AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionSASStart AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableActionSASConfirm AppSetupRecoveryKeyResetConfirmResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationDirectionIncoming AppSetupRecoveryKeyResetConfirmResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationDirectionOutgoing AppSetupRecoveryKeyResetConfirmResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationMethodQR AppSetupRecoveryKeyResetConfirmResponseSessionVerificationMethod = "qr"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationMethodSAS AppSetupRecoveryKeyResetConfirmResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationPurposeLogin AppSetupRecoveryKeyResetConfirmResponseSessionVerificationPurpose = "login"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationPurposeDevice AppSetupRecoveryKeyResetConfirmResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateRequested AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "requested"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateReady AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "ready"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateSASReady AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateQRScanned AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateDone AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "done"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateCancelled AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "cancelled"`

        - `const AppSetupRecoveryKeyResetConfirmResponseSessionVerificationStateError AppSetupRecoveryKeyResetConfirmResponseSessionVerificationState = "error"`

      - `Error AppSetupRecoveryKeyResetConfirmResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupRecoveryKeyResetConfirmResponseSessionVerificationOtherDevice`

        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 AppSetupRecoveryKeyResetConfirmResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupRecoveryKeyResetConfirmResponseSessionVerificationSAS`

        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.Setup.RecoveryKey.Reset.Confirm(context.TODO(), beeperdesktopapi.AppSetupRecoveryKeyResetConfirmParams{
    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"
      }
    }
  }
}
```

# Verifications

## List active verifications

`client.App.Setup.Verifications.List(ctx) (*AppSetupVerificationListResponse, error)`

**get** `/v1/app/setup/verifications`

List pending and active device verifications. Use this to recover state without a WebSocket connection.

### Returns

- `type AppSetupVerificationListResponse struct{…}`

  - `Items []AppSetupVerificationListResponseItem`

    - `ID string`

      Verification ID to pass in verification action paths.

    - `AvailableActions []string`

      Verification actions that are valid for the current state.

      - `const AppSetupVerificationListResponseItemAvailableActionAccept AppSetupVerificationListResponseItemAvailableAction = "accept"`

      - `const AppSetupVerificationListResponseItemAvailableActionCancel AppSetupVerificationListResponseItemAvailableAction = "cancel"`

      - `const AppSetupVerificationListResponseItemAvailableActionQRConfirmScanned AppSetupVerificationListResponseItemAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationListResponseItemAvailableActionSASStart AppSetupVerificationListResponseItemAvailableAction = "sas.start"`

      - `const AppSetupVerificationListResponseItemAvailableActionSASConfirm AppSetupVerificationListResponseItemAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationListResponseItemDirectionIncoming AppSetupVerificationListResponseItemDirection = "incoming"`

      - `const AppSetupVerificationListResponseItemDirectionOutgoing AppSetupVerificationListResponseItemDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationListResponseItemMethodQR AppSetupVerificationListResponseItemMethod = "qr"`

      - `const AppSetupVerificationListResponseItemMethodSAS AppSetupVerificationListResponseItemMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationListResponseItemPurposeLogin AppSetupVerificationListResponseItemPurpose = "login"`

      - `const AppSetupVerificationListResponseItemPurposeDevice AppSetupVerificationListResponseItemPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationListResponseItemStateRequested AppSetupVerificationListResponseItemState = "requested"`

      - `const AppSetupVerificationListResponseItemStateReady AppSetupVerificationListResponseItemState = "ready"`

      - `const AppSetupVerificationListResponseItemStateSASReady AppSetupVerificationListResponseItemState = "sas_ready"`

      - `const AppSetupVerificationListResponseItemStateQRScanned AppSetupVerificationListResponseItemState = "qr_scanned"`

      - `const AppSetupVerificationListResponseItemStateDone AppSetupVerificationListResponseItemState = "done"`

      - `const AppSetupVerificationListResponseItemStateCancelled AppSetupVerificationListResponseItemState = "cancelled"`

      - `const AppSetupVerificationListResponseItemStateError AppSetupVerificationListResponseItemState = "error"`

    - `Error AppSetupVerificationListResponseItemError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationListResponseItemOtherDevice`

      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 AppSetupVerificationListResponseItemQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationListResponseItemSAS`

      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"),
  )
  verifications, err := client.App.Setup.Verifications.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", verifications.Items)
}
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  ]
}
```

## Start device verification

`client.App.Setup.Verifications.New(ctx, body) (*AppSetupVerificationNewResponse, error)`

**post** `/v1/app/setup/verifications`

Start verifying this device from another signed-in device.

### Parameters

- `body AppSetupVerificationNewParams`

  - `Purpose param.Field[AppSetupVerificationNewParamsPurpose]`

    Why this verification is being started.

    - `const AppSetupVerificationNewParamsPurposeLogin AppSetupVerificationNewParamsPurpose = "login"`

    - `const AppSetupVerificationNewParamsPurposeDevice AppSetupVerificationNewParamsPurpose = "device"`

  - `UserID param.Field[string]`

    Beeper user ID to verify. Defaults to the signed-in user.

### Returns

- `type AppSetupVerificationNewResponse struct{…}`

  - `Session AppSetupVerificationNewResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationNewResponseSessionE2EE`

      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 AppSetupVerificationNewResponseSessionE2EESecrets`

        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 AppSetupVerificationNewResponseSessionStateNeedsLogin AppSetupVerificationNewResponseSessionState = "needs-login"`

      - `const AppSetupVerificationNewResponseSessionStateInitializing AppSetupVerificationNewResponseSessionState = "initializing"`

      - `const AppSetupVerificationNewResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationNewResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationNewResponseSessionStateNeedsVerification AppSetupVerificationNewResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationNewResponseSessionStateNeedsSecrets AppSetupVerificationNewResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationNewResponseSessionStateNeedsFirstSync AppSetupVerificationNewResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationNewResponseSessionStateReady AppSetupVerificationNewResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationNewResponseSessionMatrix`

      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 AppSetupVerificationNewResponseSessionVerification`

      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 AppSetupVerificationNewResponseSessionVerificationAvailableActionAccept AppSetupVerificationNewResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationNewResponseSessionVerificationAvailableActionCancel AppSetupVerificationNewResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationNewResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationNewResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationNewResponseSessionVerificationAvailableActionSASStart AppSetupVerificationNewResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationNewResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationNewResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationNewResponseSessionVerificationDirectionIncoming AppSetupVerificationNewResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationNewResponseSessionVerificationDirectionOutgoing AppSetupVerificationNewResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationNewResponseSessionVerificationMethodQR AppSetupVerificationNewResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationNewResponseSessionVerificationMethodSAS AppSetupVerificationNewResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationNewResponseSessionVerificationPurposeLogin AppSetupVerificationNewResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationNewResponseSessionVerificationPurposeDevice AppSetupVerificationNewResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationNewResponseSessionVerificationStateRequested AppSetupVerificationNewResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationNewResponseSessionVerificationStateReady AppSetupVerificationNewResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationNewResponseSessionVerificationStateSASReady AppSetupVerificationNewResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationNewResponseSessionVerificationStateQRScanned AppSetupVerificationNewResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationNewResponseSessionVerificationStateDone AppSetupVerificationNewResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationNewResponseSessionVerificationStateCancelled AppSetupVerificationNewResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationNewResponseSessionVerificationStateError AppSetupVerificationNewResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationNewResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationNewResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationNewResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationNewResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationNewResponseVerification`

    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 AppSetupVerificationNewResponseVerificationAvailableActionAccept AppSetupVerificationNewResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationNewResponseVerificationAvailableActionCancel AppSetupVerificationNewResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationNewResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationNewResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationNewResponseVerificationAvailableActionSASStart AppSetupVerificationNewResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationNewResponseVerificationAvailableActionSASConfirm AppSetupVerificationNewResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationNewResponseVerificationDirectionIncoming AppSetupVerificationNewResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationNewResponseVerificationDirectionOutgoing AppSetupVerificationNewResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationNewResponseVerificationMethodQR AppSetupVerificationNewResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationNewResponseVerificationMethodSAS AppSetupVerificationNewResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationNewResponseVerificationPurposeLogin AppSetupVerificationNewResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationNewResponseVerificationPurposeDevice AppSetupVerificationNewResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationNewResponseVerificationStateRequested AppSetupVerificationNewResponseVerificationState = "requested"`

      - `const AppSetupVerificationNewResponseVerificationStateReady AppSetupVerificationNewResponseVerificationState = "ready"`

      - `const AppSetupVerificationNewResponseVerificationStateSASReady AppSetupVerificationNewResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationNewResponseVerificationStateQRScanned AppSetupVerificationNewResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationNewResponseVerificationStateDone AppSetupVerificationNewResponseVerificationState = "done"`

      - `const AppSetupVerificationNewResponseVerificationStateCancelled AppSetupVerificationNewResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationNewResponseVerificationStateError AppSetupVerificationNewResponseVerificationState = "error"`

    - `Error AppSetupVerificationNewResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationNewResponseVerificationOtherDevice`

      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 AppSetupVerificationNewResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationNewResponseVerificationSAS`

      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"),
  )
  verification, err := client.App.Setup.Verifications.New(context.TODO(), beeperdesktopapi.AppSetupVerificationNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", verification.Session)
}
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Get verification

`client.App.Setup.Verifications.Get(ctx, verificationID) (*AppSetupVerificationGetResponse, error)`

**get** `/v1/app/setup/verifications/{verificationID}`

Get the current state of a device verification transaction.

### Parameters

- `verificationID string`

  Verification ID.

### Returns

- `type AppSetupVerificationGetResponse struct{…}`

  - `Session AppSetupVerificationGetResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationGetResponseSessionE2EE`

      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 AppSetupVerificationGetResponseSessionE2EESecrets`

        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 AppSetupVerificationGetResponseSessionStateNeedsLogin AppSetupVerificationGetResponseSessionState = "needs-login"`

      - `const AppSetupVerificationGetResponseSessionStateInitializing AppSetupVerificationGetResponseSessionState = "initializing"`

      - `const AppSetupVerificationGetResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationGetResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationGetResponseSessionStateNeedsVerification AppSetupVerificationGetResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationGetResponseSessionStateNeedsSecrets AppSetupVerificationGetResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationGetResponseSessionStateNeedsFirstSync AppSetupVerificationGetResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationGetResponseSessionStateReady AppSetupVerificationGetResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationGetResponseSessionMatrix`

      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 AppSetupVerificationGetResponseSessionVerification`

      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 AppSetupVerificationGetResponseSessionVerificationAvailableActionAccept AppSetupVerificationGetResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationGetResponseSessionVerificationAvailableActionCancel AppSetupVerificationGetResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationGetResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationGetResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationGetResponseSessionVerificationAvailableActionSASStart AppSetupVerificationGetResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationGetResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationGetResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationGetResponseSessionVerificationDirectionIncoming AppSetupVerificationGetResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationGetResponseSessionVerificationDirectionOutgoing AppSetupVerificationGetResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationGetResponseSessionVerificationMethodQR AppSetupVerificationGetResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationGetResponseSessionVerificationMethodSAS AppSetupVerificationGetResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationGetResponseSessionVerificationPurposeLogin AppSetupVerificationGetResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationGetResponseSessionVerificationPurposeDevice AppSetupVerificationGetResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationGetResponseSessionVerificationStateRequested AppSetupVerificationGetResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationGetResponseSessionVerificationStateReady AppSetupVerificationGetResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationGetResponseSessionVerificationStateSASReady AppSetupVerificationGetResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationGetResponseSessionVerificationStateQRScanned AppSetupVerificationGetResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationGetResponseSessionVerificationStateDone AppSetupVerificationGetResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationGetResponseSessionVerificationStateCancelled AppSetupVerificationGetResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationGetResponseSessionVerificationStateError AppSetupVerificationGetResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationGetResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationGetResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationGetResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationGetResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationGetResponseVerification`

    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 AppSetupVerificationGetResponseVerificationAvailableActionAccept AppSetupVerificationGetResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationGetResponseVerificationAvailableActionCancel AppSetupVerificationGetResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationGetResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationGetResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationGetResponseVerificationAvailableActionSASStart AppSetupVerificationGetResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationGetResponseVerificationAvailableActionSASConfirm AppSetupVerificationGetResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationGetResponseVerificationDirectionIncoming AppSetupVerificationGetResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationGetResponseVerificationDirectionOutgoing AppSetupVerificationGetResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationGetResponseVerificationMethodQR AppSetupVerificationGetResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationGetResponseVerificationMethodSAS AppSetupVerificationGetResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationGetResponseVerificationPurposeLogin AppSetupVerificationGetResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationGetResponseVerificationPurposeDevice AppSetupVerificationGetResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationGetResponseVerificationStateRequested AppSetupVerificationGetResponseVerificationState = "requested"`

      - `const AppSetupVerificationGetResponseVerificationStateReady AppSetupVerificationGetResponseVerificationState = "ready"`

      - `const AppSetupVerificationGetResponseVerificationStateSASReady AppSetupVerificationGetResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationGetResponseVerificationStateQRScanned AppSetupVerificationGetResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationGetResponseVerificationStateDone AppSetupVerificationGetResponseVerificationState = "done"`

      - `const AppSetupVerificationGetResponseVerificationStateCancelled AppSetupVerificationGetResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationGetResponseVerificationStateError AppSetupVerificationGetResponseVerificationState = "error"`

    - `Error AppSetupVerificationGetResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationGetResponseVerificationOtherDevice`

      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 AppSetupVerificationGetResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationGetResponseVerificationSAS`

      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"),
  )
  verification, err := client.App.Setup.Verifications.Get(context.TODO(), "x")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", verification.Session)
}
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Accept device verification

`client.App.Setup.Verifications.Accept(ctx, verificationID) (*AppSetupVerificationAcceptResponse, error)`

**post** `/v1/app/setup/verifications/{verificationID}/accept`

Accept an incoming device verification request.

### Parameters

- `verificationID string`

  Verification ID.

### Returns

- `type AppSetupVerificationAcceptResponse struct{…}`

  - `Session AppSetupVerificationAcceptResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationAcceptResponseSessionE2EE`

      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 AppSetupVerificationAcceptResponseSessionE2EESecrets`

        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 AppSetupVerificationAcceptResponseSessionStateNeedsLogin AppSetupVerificationAcceptResponseSessionState = "needs-login"`

      - `const AppSetupVerificationAcceptResponseSessionStateInitializing AppSetupVerificationAcceptResponseSessionState = "initializing"`

      - `const AppSetupVerificationAcceptResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationAcceptResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationAcceptResponseSessionStateNeedsVerification AppSetupVerificationAcceptResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationAcceptResponseSessionStateNeedsSecrets AppSetupVerificationAcceptResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationAcceptResponseSessionStateNeedsFirstSync AppSetupVerificationAcceptResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationAcceptResponseSessionStateReady AppSetupVerificationAcceptResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationAcceptResponseSessionMatrix`

      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 AppSetupVerificationAcceptResponseSessionVerification`

      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 AppSetupVerificationAcceptResponseSessionVerificationAvailableActionAccept AppSetupVerificationAcceptResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationAvailableActionCancel AppSetupVerificationAcceptResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationAcceptResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationAvailableActionSASStart AppSetupVerificationAcceptResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationAcceptResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationAcceptResponseSessionVerificationDirectionIncoming AppSetupVerificationAcceptResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationDirectionOutgoing AppSetupVerificationAcceptResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationAcceptResponseSessionVerificationMethodQR AppSetupVerificationAcceptResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationMethodSAS AppSetupVerificationAcceptResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationAcceptResponseSessionVerificationPurposeLogin AppSetupVerificationAcceptResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationPurposeDevice AppSetupVerificationAcceptResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateRequested AppSetupVerificationAcceptResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateReady AppSetupVerificationAcceptResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateSASReady AppSetupVerificationAcceptResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateQRScanned AppSetupVerificationAcceptResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateDone AppSetupVerificationAcceptResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateCancelled AppSetupVerificationAcceptResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationAcceptResponseSessionVerificationStateError AppSetupVerificationAcceptResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationAcceptResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationAcceptResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationAcceptResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationAcceptResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationAcceptResponseVerification`

    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 AppSetupVerificationAcceptResponseVerificationAvailableActionAccept AppSetupVerificationAcceptResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationAcceptResponseVerificationAvailableActionCancel AppSetupVerificationAcceptResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationAcceptResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationAcceptResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationAcceptResponseVerificationAvailableActionSASStart AppSetupVerificationAcceptResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationAcceptResponseVerificationAvailableActionSASConfirm AppSetupVerificationAcceptResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationAcceptResponseVerificationDirectionIncoming AppSetupVerificationAcceptResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationAcceptResponseVerificationDirectionOutgoing AppSetupVerificationAcceptResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationAcceptResponseVerificationMethodQR AppSetupVerificationAcceptResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationAcceptResponseVerificationMethodSAS AppSetupVerificationAcceptResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationAcceptResponseVerificationPurposeLogin AppSetupVerificationAcceptResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationAcceptResponseVerificationPurposeDevice AppSetupVerificationAcceptResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationAcceptResponseVerificationStateRequested AppSetupVerificationAcceptResponseVerificationState = "requested"`

      - `const AppSetupVerificationAcceptResponseVerificationStateReady AppSetupVerificationAcceptResponseVerificationState = "ready"`

      - `const AppSetupVerificationAcceptResponseVerificationStateSASReady AppSetupVerificationAcceptResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationAcceptResponseVerificationStateQRScanned AppSetupVerificationAcceptResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationAcceptResponseVerificationStateDone AppSetupVerificationAcceptResponseVerificationState = "done"`

      - `const AppSetupVerificationAcceptResponseVerificationStateCancelled AppSetupVerificationAcceptResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationAcceptResponseVerificationStateError AppSetupVerificationAcceptResponseVerificationState = "error"`

    - `Error AppSetupVerificationAcceptResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationAcceptResponseVerificationOtherDevice`

      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 AppSetupVerificationAcceptResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationAcceptResponseVerificationSAS`

      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.Setup.Verifications.Accept(context.TODO(), "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"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Cancel device verification

`client.App.Setup.Verifications.Cancel(ctx, verificationID, body) (*AppSetupVerificationCancelResponse, error)`

**post** `/v1/app/setup/verifications/{verificationID}/cancel`

Cancel an active device verification request.

### Parameters

- `verificationID string`

  Verification ID.

- `body AppSetupVerificationCancelParams`

  - `Code param.Field[string]`

    Optional cancellation code.

  - `Reason param.Field[string]`

    Optional user-facing cancellation reason.

### Returns

- `type AppSetupVerificationCancelResponse struct{…}`

  - `Session AppSetupVerificationCancelResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationCancelResponseSessionE2EE`

      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 AppSetupVerificationCancelResponseSessionE2EESecrets`

        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 AppSetupVerificationCancelResponseSessionStateNeedsLogin AppSetupVerificationCancelResponseSessionState = "needs-login"`

      - `const AppSetupVerificationCancelResponseSessionStateInitializing AppSetupVerificationCancelResponseSessionState = "initializing"`

      - `const AppSetupVerificationCancelResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationCancelResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationCancelResponseSessionStateNeedsVerification AppSetupVerificationCancelResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationCancelResponseSessionStateNeedsSecrets AppSetupVerificationCancelResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationCancelResponseSessionStateNeedsFirstSync AppSetupVerificationCancelResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationCancelResponseSessionStateReady AppSetupVerificationCancelResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationCancelResponseSessionMatrix`

      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 AppSetupVerificationCancelResponseSessionVerification`

      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 AppSetupVerificationCancelResponseSessionVerificationAvailableActionAccept AppSetupVerificationCancelResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationCancelResponseSessionVerificationAvailableActionCancel AppSetupVerificationCancelResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationCancelResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationCancelResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationCancelResponseSessionVerificationAvailableActionSASStart AppSetupVerificationCancelResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationCancelResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationCancelResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationCancelResponseSessionVerificationDirectionIncoming AppSetupVerificationCancelResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationCancelResponseSessionVerificationDirectionOutgoing AppSetupVerificationCancelResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationCancelResponseSessionVerificationMethodQR AppSetupVerificationCancelResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationCancelResponseSessionVerificationMethodSAS AppSetupVerificationCancelResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationCancelResponseSessionVerificationPurposeLogin AppSetupVerificationCancelResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationCancelResponseSessionVerificationPurposeDevice AppSetupVerificationCancelResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationCancelResponseSessionVerificationStateRequested AppSetupVerificationCancelResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationCancelResponseSessionVerificationStateReady AppSetupVerificationCancelResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationCancelResponseSessionVerificationStateSASReady AppSetupVerificationCancelResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationCancelResponseSessionVerificationStateQRScanned AppSetupVerificationCancelResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationCancelResponseSessionVerificationStateDone AppSetupVerificationCancelResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationCancelResponseSessionVerificationStateCancelled AppSetupVerificationCancelResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationCancelResponseSessionVerificationStateError AppSetupVerificationCancelResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationCancelResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationCancelResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationCancelResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationCancelResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationCancelResponseVerification`

    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 AppSetupVerificationCancelResponseVerificationAvailableActionAccept AppSetupVerificationCancelResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationCancelResponseVerificationAvailableActionCancel AppSetupVerificationCancelResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationCancelResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationCancelResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationCancelResponseVerificationAvailableActionSASStart AppSetupVerificationCancelResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationCancelResponseVerificationAvailableActionSASConfirm AppSetupVerificationCancelResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationCancelResponseVerificationDirectionIncoming AppSetupVerificationCancelResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationCancelResponseVerificationDirectionOutgoing AppSetupVerificationCancelResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationCancelResponseVerificationMethodQR AppSetupVerificationCancelResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationCancelResponseVerificationMethodSAS AppSetupVerificationCancelResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationCancelResponseVerificationPurposeLogin AppSetupVerificationCancelResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationCancelResponseVerificationPurposeDevice AppSetupVerificationCancelResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationCancelResponseVerificationStateRequested AppSetupVerificationCancelResponseVerificationState = "requested"`

      - `const AppSetupVerificationCancelResponseVerificationStateReady AppSetupVerificationCancelResponseVerificationState = "ready"`

      - `const AppSetupVerificationCancelResponseVerificationStateSASReady AppSetupVerificationCancelResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationCancelResponseVerificationStateQRScanned AppSetupVerificationCancelResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationCancelResponseVerificationStateDone AppSetupVerificationCancelResponseVerificationState = "done"`

      - `const AppSetupVerificationCancelResponseVerificationStateCancelled AppSetupVerificationCancelResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationCancelResponseVerificationStateError AppSetupVerificationCancelResponseVerificationState = "error"`

    - `Error AppSetupVerificationCancelResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationCancelResponseVerificationOtherDevice`

      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 AppSetupVerificationCancelResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationCancelResponseVerificationSAS`

      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.Setup.Verifications.Cancel(
    context.TODO(),
    "x",
    beeperdesktopapi.AppSetupVerificationCancelParams{

    },
  )
  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"
      }
    }
  },
  "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"
    }
  }
}
```

# QR

## Scan verification QR code

`client.App.Setup.Verifications.QR.Scan(ctx, body) (*AppSetupVerificationQRScanResponse, error)`

**post** `/v1/app/setup/verifications/qr/scan`

Submit the QR code scanned from another signed-in device.

### Parameters

- `body AppSetupVerificationQRScanParams`

  - `Data param.Field[string]`

    QR code payload scanned from the other device.

### Returns

- `type AppSetupVerificationQRScanResponse struct{…}`

  - `Session AppSetupVerificationQRScanResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationQRScanResponseSessionE2EE`

      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 AppSetupVerificationQRScanResponseSessionE2EESecrets`

        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 AppSetupVerificationQRScanResponseSessionStateNeedsLogin AppSetupVerificationQRScanResponseSessionState = "needs-login"`

      - `const AppSetupVerificationQRScanResponseSessionStateInitializing AppSetupVerificationQRScanResponseSessionState = "initializing"`

      - `const AppSetupVerificationQRScanResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationQRScanResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationQRScanResponseSessionStateNeedsVerification AppSetupVerificationQRScanResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationQRScanResponseSessionStateNeedsSecrets AppSetupVerificationQRScanResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationQRScanResponseSessionStateNeedsFirstSync AppSetupVerificationQRScanResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationQRScanResponseSessionStateReady AppSetupVerificationQRScanResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationQRScanResponseSessionMatrix`

      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 AppSetupVerificationQRScanResponseSessionVerification`

      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 AppSetupVerificationQRScanResponseSessionVerificationAvailableActionAccept AppSetupVerificationQRScanResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationAvailableActionCancel AppSetupVerificationQRScanResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationQRScanResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationAvailableActionSASStart AppSetupVerificationQRScanResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationQRScanResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationQRScanResponseSessionVerificationDirectionIncoming AppSetupVerificationQRScanResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationDirectionOutgoing AppSetupVerificationQRScanResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationQRScanResponseSessionVerificationMethodQR AppSetupVerificationQRScanResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationMethodSAS AppSetupVerificationQRScanResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationQRScanResponseSessionVerificationPurposeLogin AppSetupVerificationQRScanResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationPurposeDevice AppSetupVerificationQRScanResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateRequested AppSetupVerificationQRScanResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateReady AppSetupVerificationQRScanResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateSASReady AppSetupVerificationQRScanResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateQRScanned AppSetupVerificationQRScanResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateDone AppSetupVerificationQRScanResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateCancelled AppSetupVerificationQRScanResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationQRScanResponseSessionVerificationStateError AppSetupVerificationQRScanResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationQRScanResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationQRScanResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationQRScanResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationQRScanResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationQRScanResponseVerification`

    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 AppSetupVerificationQRScanResponseVerificationAvailableActionAccept AppSetupVerificationQRScanResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationQRScanResponseVerificationAvailableActionCancel AppSetupVerificationQRScanResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationQRScanResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationQRScanResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationQRScanResponseVerificationAvailableActionSASStart AppSetupVerificationQRScanResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationQRScanResponseVerificationAvailableActionSASConfirm AppSetupVerificationQRScanResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationQRScanResponseVerificationDirectionIncoming AppSetupVerificationQRScanResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationQRScanResponseVerificationDirectionOutgoing AppSetupVerificationQRScanResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationQRScanResponseVerificationMethodQR AppSetupVerificationQRScanResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationQRScanResponseVerificationMethodSAS AppSetupVerificationQRScanResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationQRScanResponseVerificationPurposeLogin AppSetupVerificationQRScanResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationQRScanResponseVerificationPurposeDevice AppSetupVerificationQRScanResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationQRScanResponseVerificationStateRequested AppSetupVerificationQRScanResponseVerificationState = "requested"`

      - `const AppSetupVerificationQRScanResponseVerificationStateReady AppSetupVerificationQRScanResponseVerificationState = "ready"`

      - `const AppSetupVerificationQRScanResponseVerificationStateSASReady AppSetupVerificationQRScanResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationQRScanResponseVerificationStateQRScanned AppSetupVerificationQRScanResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationQRScanResponseVerificationStateDone AppSetupVerificationQRScanResponseVerificationState = "done"`

      - `const AppSetupVerificationQRScanResponseVerificationStateCancelled AppSetupVerificationQRScanResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationQRScanResponseVerificationStateError AppSetupVerificationQRScanResponseVerificationState = "error"`

    - `Error AppSetupVerificationQRScanResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationQRScanResponseVerificationOtherDevice`

      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 AppSetupVerificationQRScanResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationQRScanResponseVerificationSAS`

      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.Setup.Verifications.QR.Scan(context.TODO(), beeperdesktopapi.AppSetupVerificationQRScanParams{
    Data: "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"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Confirm QR code scan

`client.App.Setup.Verifications.QR.ConfirmScanned(ctx, verificationID) (*AppSetupVerificationQRConfirmScannedResponse, error)`

**post** `/v1/app/setup/verifications/{verificationID}/qr/confirm-scanned`

Confirm that another device scanned this device QR code.

### Parameters

- `verificationID string`

  Verification ID.

### Returns

- `type AppSetupVerificationQRConfirmScannedResponse struct{…}`

  - `Session AppSetupVerificationQRConfirmScannedResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationQRConfirmScannedResponseSessionE2EE`

      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 AppSetupVerificationQRConfirmScannedResponseSessionE2EESecrets`

        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 AppSetupVerificationQRConfirmScannedResponseSessionStateNeedsLogin AppSetupVerificationQRConfirmScannedResponseSessionState = "needs-login"`

      - `const AppSetupVerificationQRConfirmScannedResponseSessionStateInitializing AppSetupVerificationQRConfirmScannedResponseSessionState = "initializing"`

      - `const AppSetupVerificationQRConfirmScannedResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationQRConfirmScannedResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationQRConfirmScannedResponseSessionStateNeedsVerification AppSetupVerificationQRConfirmScannedResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationQRConfirmScannedResponseSessionStateNeedsSecrets AppSetupVerificationQRConfirmScannedResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationQRConfirmScannedResponseSessionStateNeedsFirstSync AppSetupVerificationQRConfirmScannedResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationQRConfirmScannedResponseSessionStateReady AppSetupVerificationQRConfirmScannedResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationQRConfirmScannedResponseSessionMatrix`

      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 AppSetupVerificationQRConfirmScannedResponseSessionVerification`

      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 AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableActionAccept AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableActionCancel AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableActionSASStart AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationQRConfirmScannedResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationDirectionIncoming AppSetupVerificationQRConfirmScannedResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationDirectionOutgoing AppSetupVerificationQRConfirmScannedResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationMethodQR AppSetupVerificationQRConfirmScannedResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationMethodSAS AppSetupVerificationQRConfirmScannedResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationPurposeLogin AppSetupVerificationQRConfirmScannedResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationPurposeDevice AppSetupVerificationQRConfirmScannedResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateRequested AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateReady AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateSASReady AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateQRScanned AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateDone AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateCancelled AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationQRConfirmScannedResponseSessionVerificationStateError AppSetupVerificationQRConfirmScannedResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationQRConfirmScannedResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationQRConfirmScannedResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationQRConfirmScannedResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationQRConfirmScannedResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationQRConfirmScannedResponseVerification`

    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 AppSetupVerificationQRConfirmScannedResponseVerificationAvailableActionAccept AppSetupVerificationQRConfirmScannedResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationAvailableActionCancel AppSetupVerificationQRConfirmScannedResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationQRConfirmScannedResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationAvailableActionSASStart AppSetupVerificationQRConfirmScannedResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationAvailableActionSASConfirm AppSetupVerificationQRConfirmScannedResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationDirectionIncoming AppSetupVerificationQRConfirmScannedResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationDirectionOutgoing AppSetupVerificationQRConfirmScannedResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationMethodQR AppSetupVerificationQRConfirmScannedResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationMethodSAS AppSetupVerificationQRConfirmScannedResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationPurposeLogin AppSetupVerificationQRConfirmScannedResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationPurposeDevice AppSetupVerificationQRConfirmScannedResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateRequested AppSetupVerificationQRConfirmScannedResponseVerificationState = "requested"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateReady AppSetupVerificationQRConfirmScannedResponseVerificationState = "ready"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateSASReady AppSetupVerificationQRConfirmScannedResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateQRScanned AppSetupVerificationQRConfirmScannedResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateDone AppSetupVerificationQRConfirmScannedResponseVerificationState = "done"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateCancelled AppSetupVerificationQRConfirmScannedResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationQRConfirmScannedResponseVerificationStateError AppSetupVerificationQRConfirmScannedResponseVerificationState = "error"`

    - `Error AppSetupVerificationQRConfirmScannedResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationQRConfirmScannedResponseVerificationOtherDevice`

      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 AppSetupVerificationQRConfirmScannedResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationQRConfirmScannedResponseVerificationSAS`

      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.Setup.Verifications.QR.ConfirmScanned(context.TODO(), "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"
      }
    }
  },
  "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"
    }
  }
}
```

# SAS

## Start emoji verification

`client.App.Setup.Verifications.SAS.Start(ctx, verificationID) (*AppSetupVerificationSASStartResponse, error)`

**post** `/v1/app/setup/verifications/{verificationID}/sas/start`

Start emoji comparison for device verification.

### Parameters

- `verificationID string`

  Verification ID.

### Returns

- `type AppSetupVerificationSASStartResponse struct{…}`

  - `Session AppSetupVerificationSASStartResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationSASStartResponseSessionE2EE`

      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 AppSetupVerificationSASStartResponseSessionE2EESecrets`

        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 AppSetupVerificationSASStartResponseSessionStateNeedsLogin AppSetupVerificationSASStartResponseSessionState = "needs-login"`

      - `const AppSetupVerificationSASStartResponseSessionStateInitializing AppSetupVerificationSASStartResponseSessionState = "initializing"`

      - `const AppSetupVerificationSASStartResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationSASStartResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationSASStartResponseSessionStateNeedsVerification AppSetupVerificationSASStartResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationSASStartResponseSessionStateNeedsSecrets AppSetupVerificationSASStartResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationSASStartResponseSessionStateNeedsFirstSync AppSetupVerificationSASStartResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationSASStartResponseSessionStateReady AppSetupVerificationSASStartResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationSASStartResponseSessionMatrix`

      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 AppSetupVerificationSASStartResponseSessionVerification`

      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 AppSetupVerificationSASStartResponseSessionVerificationAvailableActionAccept AppSetupVerificationSASStartResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationAvailableActionCancel AppSetupVerificationSASStartResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationSASStartResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationAvailableActionSASStart AppSetupVerificationSASStartResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationSASStartResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationSASStartResponseSessionVerificationDirectionIncoming AppSetupVerificationSASStartResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationDirectionOutgoing AppSetupVerificationSASStartResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationSASStartResponseSessionVerificationMethodQR AppSetupVerificationSASStartResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationMethodSAS AppSetupVerificationSASStartResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationSASStartResponseSessionVerificationPurposeLogin AppSetupVerificationSASStartResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationPurposeDevice AppSetupVerificationSASStartResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateRequested AppSetupVerificationSASStartResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateReady AppSetupVerificationSASStartResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateSASReady AppSetupVerificationSASStartResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateQRScanned AppSetupVerificationSASStartResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateDone AppSetupVerificationSASStartResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateCancelled AppSetupVerificationSASStartResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationSASStartResponseSessionVerificationStateError AppSetupVerificationSASStartResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationSASStartResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationSASStartResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationSASStartResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationSASStartResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationSASStartResponseVerification`

    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 AppSetupVerificationSASStartResponseVerificationAvailableActionAccept AppSetupVerificationSASStartResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationSASStartResponseVerificationAvailableActionCancel AppSetupVerificationSASStartResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationSASStartResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationSASStartResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationSASStartResponseVerificationAvailableActionSASStart AppSetupVerificationSASStartResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationSASStartResponseVerificationAvailableActionSASConfirm AppSetupVerificationSASStartResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationSASStartResponseVerificationDirectionIncoming AppSetupVerificationSASStartResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationSASStartResponseVerificationDirectionOutgoing AppSetupVerificationSASStartResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationSASStartResponseVerificationMethodQR AppSetupVerificationSASStartResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationSASStartResponseVerificationMethodSAS AppSetupVerificationSASStartResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationSASStartResponseVerificationPurposeLogin AppSetupVerificationSASStartResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationSASStartResponseVerificationPurposeDevice AppSetupVerificationSASStartResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationSASStartResponseVerificationStateRequested AppSetupVerificationSASStartResponseVerificationState = "requested"`

      - `const AppSetupVerificationSASStartResponseVerificationStateReady AppSetupVerificationSASStartResponseVerificationState = "ready"`

      - `const AppSetupVerificationSASStartResponseVerificationStateSASReady AppSetupVerificationSASStartResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationSASStartResponseVerificationStateQRScanned AppSetupVerificationSASStartResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationSASStartResponseVerificationStateDone AppSetupVerificationSASStartResponseVerificationState = "done"`

      - `const AppSetupVerificationSASStartResponseVerificationStateCancelled AppSetupVerificationSASStartResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationSASStartResponseVerificationStateError AppSetupVerificationSASStartResponseVerificationState = "error"`

    - `Error AppSetupVerificationSASStartResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationSASStartResponseVerificationOtherDevice`

      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 AppSetupVerificationSASStartResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationSASStartResponseVerificationSAS`

      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.Setup.Verifications.SAS.Start(context.TODO(), "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"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Confirm emoji verification

`client.App.Setup.Verifications.SAS.Confirm(ctx, verificationID) (*AppSetupVerificationSASConfirmResponse, error)`

**post** `/v1/app/setup/verifications/{verificationID}/sas/confirm`

Confirm that the emoji or number sequence matches on both devices.

### Parameters

- `verificationID string`

  Verification ID.

### Returns

- `type AppSetupVerificationSASConfirmResponse struct{…}`

  - `Session AppSetupVerificationSASConfirmResponseSession`

    Current app sign-in and encrypted messaging setup state.

    - `E2EE AppSetupVerificationSASConfirmResponseSessionE2EE`

      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 AppSetupVerificationSASConfirmResponseSessionE2EESecrets`

        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 AppSetupVerificationSASConfirmResponseSessionStateNeedsLogin AppSetupVerificationSASConfirmResponseSessionState = "needs-login"`

      - `const AppSetupVerificationSASConfirmResponseSessionStateInitializing AppSetupVerificationSASConfirmResponseSessionState = "initializing"`

      - `const AppSetupVerificationSASConfirmResponseSessionStateNeedsCrossSigningSetup AppSetupVerificationSASConfirmResponseSessionState = "needs-cross-signing-setup"`

      - `const AppSetupVerificationSASConfirmResponseSessionStateNeedsVerification AppSetupVerificationSASConfirmResponseSessionState = "needs-verification"`

      - `const AppSetupVerificationSASConfirmResponseSessionStateNeedsSecrets AppSetupVerificationSASConfirmResponseSessionState = "needs-secrets"`

      - `const AppSetupVerificationSASConfirmResponseSessionStateNeedsFirstSync AppSetupVerificationSASConfirmResponseSessionState = "needs-first-sync"`

      - `const AppSetupVerificationSASConfirmResponseSessionStateReady AppSetupVerificationSASConfirmResponseSessionState = "ready"`

    - `Matrix AppSetupVerificationSASConfirmResponseSessionMatrix`

      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 AppSetupVerificationSASConfirmResponseSessionVerification`

      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 AppSetupVerificationSASConfirmResponseSessionVerificationAvailableActionAccept AppSetupVerificationSASConfirmResponseSessionVerificationAvailableAction = "accept"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationAvailableActionCancel AppSetupVerificationSASConfirmResponseSessionVerificationAvailableAction = "cancel"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationAvailableActionQRConfirmScanned AppSetupVerificationSASConfirmResponseSessionVerificationAvailableAction = "qr.confirmScanned"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationAvailableActionSASStart AppSetupVerificationSASConfirmResponseSessionVerificationAvailableAction = "sas.start"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationAvailableActionSASConfirm AppSetupVerificationSASConfirmResponseSessionVerificationAvailableAction = "sas.confirm"`

      - `Direction string`

        Whether this device started or received the verification.

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationDirectionIncoming AppSetupVerificationSASConfirmResponseSessionVerificationDirection = "incoming"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationDirectionOutgoing AppSetupVerificationSASConfirmResponseSessionVerificationDirection = "outgoing"`

      - `Methods []string`

        Verification methods supported for this transaction.

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationMethodQR AppSetupVerificationSASConfirmResponseSessionVerificationMethod = "qr"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationMethodSAS AppSetupVerificationSASConfirmResponseSessionVerificationMethod = "sas"`

      - `Purpose string`

        Why this verification exists.

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationPurposeLogin AppSetupVerificationSASConfirmResponseSessionVerificationPurpose = "login"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationPurposeDevice AppSetupVerificationSASConfirmResponseSessionVerificationPurpose = "device"`

      - `State string`

        Current trusted-device verification state.

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateRequested AppSetupVerificationSASConfirmResponseSessionVerificationState = "requested"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateReady AppSetupVerificationSASConfirmResponseSessionVerificationState = "ready"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateSASReady AppSetupVerificationSASConfirmResponseSessionVerificationState = "sas_ready"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateQRScanned AppSetupVerificationSASConfirmResponseSessionVerificationState = "qr_scanned"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateDone AppSetupVerificationSASConfirmResponseSessionVerificationState = "done"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateCancelled AppSetupVerificationSASConfirmResponseSessionVerificationState = "cancelled"`

        - `const AppSetupVerificationSASConfirmResponseSessionVerificationStateError AppSetupVerificationSASConfirmResponseSessionVerificationState = "error"`

      - `Error AppSetupVerificationSASConfirmResponseSessionVerificationError`

        Verification error details, if verification stopped.

        - `Code string`

          Verification error code.

        - `Reason string`

          User-facing verification error message.

      - `OtherDevice AppSetupVerificationSASConfirmResponseSessionVerificationOtherDevice`

        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 AppSetupVerificationSASConfirmResponseSessionVerificationQR`

        QR verification data.

        - `Data string`

          QR code payload to display for verification.

      - `SAS AppSetupVerificationSASConfirmResponseSessionVerificationSAS`

        Emoji or number comparison data for verification.

        - `Emojis string`

          Emoji sequence to compare on both devices.

        - `Decimals string`

          Number sequence to compare on both devices.

  - `Verification AppSetupVerificationSASConfirmResponseVerification`

    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 AppSetupVerificationSASConfirmResponseVerificationAvailableActionAccept AppSetupVerificationSASConfirmResponseVerificationAvailableAction = "accept"`

      - `const AppSetupVerificationSASConfirmResponseVerificationAvailableActionCancel AppSetupVerificationSASConfirmResponseVerificationAvailableAction = "cancel"`

      - `const AppSetupVerificationSASConfirmResponseVerificationAvailableActionQRConfirmScanned AppSetupVerificationSASConfirmResponseVerificationAvailableAction = "qr.confirmScanned"`

      - `const AppSetupVerificationSASConfirmResponseVerificationAvailableActionSASStart AppSetupVerificationSASConfirmResponseVerificationAvailableAction = "sas.start"`

      - `const AppSetupVerificationSASConfirmResponseVerificationAvailableActionSASConfirm AppSetupVerificationSASConfirmResponseVerificationAvailableAction = "sas.confirm"`

    - `Direction string`

      Whether this device started or received the verification.

      - `const AppSetupVerificationSASConfirmResponseVerificationDirectionIncoming AppSetupVerificationSASConfirmResponseVerificationDirection = "incoming"`

      - `const AppSetupVerificationSASConfirmResponseVerificationDirectionOutgoing AppSetupVerificationSASConfirmResponseVerificationDirection = "outgoing"`

    - `Methods []string`

      Verification methods supported for this transaction.

      - `const AppSetupVerificationSASConfirmResponseVerificationMethodQR AppSetupVerificationSASConfirmResponseVerificationMethod = "qr"`

      - `const AppSetupVerificationSASConfirmResponseVerificationMethodSAS AppSetupVerificationSASConfirmResponseVerificationMethod = "sas"`

    - `Purpose string`

      Why this verification exists.

      - `const AppSetupVerificationSASConfirmResponseVerificationPurposeLogin AppSetupVerificationSASConfirmResponseVerificationPurpose = "login"`

      - `const AppSetupVerificationSASConfirmResponseVerificationPurposeDevice AppSetupVerificationSASConfirmResponseVerificationPurpose = "device"`

    - `State string`

      Current trusted-device verification state.

      - `const AppSetupVerificationSASConfirmResponseVerificationStateRequested AppSetupVerificationSASConfirmResponseVerificationState = "requested"`

      - `const AppSetupVerificationSASConfirmResponseVerificationStateReady AppSetupVerificationSASConfirmResponseVerificationState = "ready"`

      - `const AppSetupVerificationSASConfirmResponseVerificationStateSASReady AppSetupVerificationSASConfirmResponseVerificationState = "sas_ready"`

      - `const AppSetupVerificationSASConfirmResponseVerificationStateQRScanned AppSetupVerificationSASConfirmResponseVerificationState = "qr_scanned"`

      - `const AppSetupVerificationSASConfirmResponseVerificationStateDone AppSetupVerificationSASConfirmResponseVerificationState = "done"`

      - `const AppSetupVerificationSASConfirmResponseVerificationStateCancelled AppSetupVerificationSASConfirmResponseVerificationState = "cancelled"`

      - `const AppSetupVerificationSASConfirmResponseVerificationStateError AppSetupVerificationSASConfirmResponseVerificationState = "error"`

    - `Error AppSetupVerificationSASConfirmResponseVerificationError`

      Verification error details, if verification stopped.

      - `Code string`

        Verification error code.

      - `Reason string`

        User-facing verification error message.

    - `OtherDevice AppSetupVerificationSASConfirmResponseVerificationOtherDevice`

      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 AppSetupVerificationSASConfirmResponseVerificationQR`

      QR verification data.

      - `Data string`

        QR code payload to display for verification.

    - `SAS AppSetupVerificationSASConfirmResponseVerificationSAS`

      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.Setup.Verifications.SAS.Confirm(context.TODO(), "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"
      }
    }
  },
  "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"
    }
  }
}
```
