Skip to content
Download Beeper

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.

ParametersExpand Collapse
verificationID string

Verification ID.

minLength1
ReturnsExpand Collapse
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 float64Optional

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.

One of the following:
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 AppSetupVerificationGetResponseSessionMatrixOptional

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 AppSetupVerificationGetResponseSessionVerificationOptional

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.

One of the following:
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.

One of the following:
const AppSetupVerificationGetResponseSessionVerificationDirectionIncoming AppSetupVerificationGetResponseSessionVerificationDirection = "incoming"
const AppSetupVerificationGetResponseSessionVerificationDirectionOutgoing AppSetupVerificationGetResponseSessionVerificationDirection = "outgoing"
Methods []string

Verification methods supported for this transaction.

One of the following:
const AppSetupVerificationGetResponseSessionVerificationMethodQR AppSetupVerificationGetResponseSessionVerificationMethod = "qr"
const AppSetupVerificationGetResponseSessionVerificationMethodSAS AppSetupVerificationGetResponseSessionVerificationMethod = "sas"
Purpose string

Why this verification exists.

One of the following:
const AppSetupVerificationGetResponseSessionVerificationPurposeLogin AppSetupVerificationGetResponseSessionVerificationPurpose = "login"
const AppSetupVerificationGetResponseSessionVerificationPurposeDevice AppSetupVerificationGetResponseSessionVerificationPurpose = "device"
State string

Current trusted-device verification state.

One of the following:
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 AppSetupVerificationGetResponseSessionVerificationErrorOptional

Verification error details, if verification stopped.

Code string

Verification error code.

Reason string

User-facing verification error message.

OtherDevice AppSetupVerificationGetResponseSessionVerificationOtherDeviceOptional

Other device participating in verification.

ID string

Other device ID.

Name stringOptional

Other device display name, if known.

OtherUserID stringOptional

Other Beeper user participating in verification.

QR AppSetupVerificationGetResponseSessionVerificationQROptional

QR verification data.

Data string

QR code payload to display for verification.

SAS AppSetupVerificationGetResponseSessionVerificationSASOptional

Emoji or number comparison data for verification.

Emojis string

Emoji sequence to compare on both devices.

Decimals stringOptional

Number sequence to compare on both devices.

Verification AppSetupVerificationGetResponseVerificationOptional

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.

One of the following:
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.

One of the following:
const AppSetupVerificationGetResponseVerificationDirectionIncoming AppSetupVerificationGetResponseVerificationDirection = "incoming"
const AppSetupVerificationGetResponseVerificationDirectionOutgoing AppSetupVerificationGetResponseVerificationDirection = "outgoing"
Methods []string

Verification methods supported for this transaction.

One of the following:
const AppSetupVerificationGetResponseVerificationMethodQR AppSetupVerificationGetResponseVerificationMethod = "qr"
const AppSetupVerificationGetResponseVerificationMethodSAS AppSetupVerificationGetResponseVerificationMethod = "sas"
Purpose string

Why this verification exists.

One of the following:
const AppSetupVerificationGetResponseVerificationPurposeLogin AppSetupVerificationGetResponseVerificationPurpose = "login"
const AppSetupVerificationGetResponseVerificationPurposeDevice AppSetupVerificationGetResponseVerificationPurpose = "device"
State string

Current trusted-device verification state.

One of the following:
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 AppSetupVerificationGetResponseVerificationErrorOptional

Verification error details, if verification stopped.

Code string

Verification error code.

Reason string

User-facing verification error message.

OtherDevice AppSetupVerificationGetResponseVerificationOtherDeviceOptional

Other device participating in verification.

ID string

Other device ID.

Name stringOptional

Other device display name, if known.

OtherUserID stringOptional

Other Beeper user participating in verification.

QR AppSetupVerificationGetResponseVerificationQROptional

QR verification data.

Data string

QR code payload to display for verification.

SAS AppSetupVerificationGetResponseVerificationSASOptional

Emoji or number comparison data for verification.

Emojis string

Emoji sequence to compare on both devices.

Decimals stringOptional

Number sequence to compare on both devices.

Get verification

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)
}
{
  "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"
    }
  }
}
Returns Examples
{
  "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"
    }
  }
}