recoveryCodes

abstract suspend fun recoveryCodes(): TOTPsGetRecoveryCodesResponse

Retrieves the recovery codes for the current user's TOTP instance. Calls the POST /sdk/v1/totps/recovery_codes endpoint. Requires an active session.

Kotlin:

StytchConsumer.totps.recoveryCodes()

iOS:

let response = try await StytchConsumer.totps.recoveryCodes()

React Native:

StytchConsumer.totps.recoveryCodes()

Return

TOTPsGetRecoveryCodesResponse containing the user's TOTP recovery codes.

Throws

StytchError

if the request fails or no TOTP instance exists.

if the coroutine is cancelled.