B2BRecoveryCodesClient

Recovery code management methods for the current member.

Functions

Link copied to clipboard
abstract suspend fun get(): B2BRecoveryCodesGetResponse

Retrieves the recovery codes for the current member's account. Calls the GET /sdk/v1/b2b/recovery_codes endpoint. Requires an active session.

Link copied to clipboard
abstract suspend fun recover(request: IB2BRecoveryCodesRecoverParameters): B2BRecoveryCodesRecoverResponse

Authenticates the member using a recovery code as an MFA fallback, establishing a member session. Calls the POST /sdk/v1/b2b/recovery_codes/recover endpoint. Automatically includes the intermediate session token if one is present. Each recovery code can only be used once.

Link copied to clipboard
abstract suspend fun rotate(request: IB2BRecoveryCodesRotateParameters): B2BRecoveryCodesRotateResponse

Rotates the recovery codes for the current member's account, invalidating the previous set and generating a new set. Calls the POST /sdk/v1/b2b/recovery_codes/rotate endpoint. Requires an active session.