verifyEmailOtp

abstract suspend fun verifyEmailOtp(type: OtpType.Email, email: String, token: String, captchaToken: String? = null): OtpVerifyResult(source)

Verifies a email otp

Return

OtpVerifyResult.Authenticated if the OTP was verified and a session was returned.

OtpVerifyResult.VerifiedNoSession if the session was verified but no session was returned (for example when changing the E-Mail with the "Secure email change enabled" option enabled)

Parameters

type

The type of the verification

email

The email to verify

token

The token used to verify

See also

Throws

RestException

or one of its subclasses if receiving an error response. If the error response contains a error code, an AuthRestException will be thrown which can be used to easier identify the problem.

HttpRequestTimeoutException

if the request timed out

HttpRequestException

on network related issues


abstract suspend fun verifyEmailOtp(type: OtpType.Email, tokenHash: String, captchaToken: String? = null): OtpVerifyResult(source)

Verifies an email otp token hash received via email

Return

OtpVerifyResult.Authenticated if the OTP was verified and a session was returned.

OtpVerifyResult.VerifiedNoSession if the session was verified but no session was returned (for example when changing the E-Mail with the "Secure email change enabled" option enabled)

Parameters

type

The type of the verification

tokenHash

The token hash used to verify

See also

Throws

RestException

or one of its subclasses if receiving an error response. If the error response contains a error code, an AuthRestException will be thrown which can be used to easier identify the problem.

HttpRequestTimeoutException

if the request timed out

HttpRequestException

on network related issues