Skip to content
Download Beeper

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.

ParametersExpand Collapse
verificationID string

Verification ID.

minLength1
body AppSetupVerificationCancelParams
Code param.Field[string]Optional

Optional cancellation code.

Reason param.Field[string]Optional

Optional user-facing cancellation reason.

ReturnsExpand Collapse
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 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 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 AppSetupVerificationCancelResponseSessionMatrixOptional

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 AppSetupVerificationCancelResponseSessionVerificationOptional

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

One of the following:
const AppSetupVerificationCancelResponseSessionVerificationDirectionIncoming AppSetupVerificationCancelResponseSessionVerificationDirection = "incoming"
const AppSetupVerificationCancelResponseSessionVerificationDirectionOutgoing AppSetupVerificationCancelResponseSessionVerificationDirection = "outgoing"
Methods []string

Verification methods supported for this transaction.

One of the following:
const AppSetupVerificationCancelResponseSessionVerificationMethodQR AppSetupVerificationCancelResponseSessionVerificationMethod = "qr"
const AppSetupVerificationCancelResponseSessionVerificationMethodSAS AppSetupVerificationCancelResponseSessionVerificationMethod = "sas"
Purpose string

Why this verification exists.

One of the following:
const AppSetupVerificationCancelResponseSessionVerificationPurposeLogin AppSetupVerificationCancelResponseSessionVerificationPurpose = "login"
const AppSetupVerificationCancelResponseSessionVerificationPurposeDevice AppSetupVerificationCancelResponseSessionVerificationPurpose = "device"
State string

Current trusted-device verification state.

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

Verification error details, if verification stopped.

Code string

Verification error code.

Reason string

User-facing verification error message.

OtherDevice AppSetupVerificationCancelResponseSessionVerificationOtherDeviceOptional

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 AppSetupVerificationCancelResponseSessionVerificationQROptional

QR verification data.

Data string

QR code payload to display for verification.

SAS AppSetupVerificationCancelResponseSessionVerificationSASOptional

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 AppSetupVerificationCancelResponseVerificationOptional

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

One of the following:
const AppSetupVerificationCancelResponseVerificationDirectionIncoming AppSetupVerificationCancelResponseVerificationDirection = "incoming"
const AppSetupVerificationCancelResponseVerificationDirectionOutgoing AppSetupVerificationCancelResponseVerificationDirection = "outgoing"
Methods []string

Verification methods supported for this transaction.

One of the following:
const AppSetupVerificationCancelResponseVerificationMethodQR AppSetupVerificationCancelResponseVerificationMethod = "qr"
const AppSetupVerificationCancelResponseVerificationMethodSAS AppSetupVerificationCancelResponseVerificationMethod = "sas"
Purpose string

Why this verification exists.

One of the following:
const AppSetupVerificationCancelResponseVerificationPurposeLogin AppSetupVerificationCancelResponseVerificationPurpose = "login"
const AppSetupVerificationCancelResponseVerificationPurposeDevice AppSetupVerificationCancelResponseVerificationPurpose = "device"
State string

Current trusted-device verification state.

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

Verification error details, if verification stopped.

Code string

Verification error code.

Reason string

User-facing verification error message.

OtherDevice AppSetupVerificationCancelResponseVerificationOtherDeviceOptional

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 AppSetupVerificationCancelResponseVerificationQROptional

QR verification data.

Data string

QR code payload to display for verification.

SAS AppSetupVerificationCancelResponseVerificationSASOptional

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.

Cancel device 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"),
  )
  response, err := client.App.Setup.Verifications.Cancel(
    context.TODO(),
    "x",
    beeperdesktopapi.AppSetupVerificationCancelParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.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"
    }
  }
}