resetStart
Initiates an email-based password reset by sending a reset link to the member's email address. Calls the POST /sdk/v1/b2b/passwords/email/reset/start endpoint. Generates and stores a PKCE code pair for use in the subsequent reset call.
Kotlin:
StytchB2B.passwords.email.resetStart(
B2BPasswordEmailResetStartParameters(
organizationId = "org-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
emailAddress = "user@example.com",
)
)iOS:
let params = B2BPasswordEmailResetStartParameters(
organizationId: "org-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
emailAddress: "user@example.com"
)
let response = try await StytchB2B.passwords.email.resetStart(params)React Native:
StytchB2B.passwords.email.resetStart({
organizationId: "org-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
emailAddress: "user@example.com",
})Return
B2BPasswordEmailResetStartResponse confirming the reset email was sent.
Parameters
IB2BPasswordEmailResetStartParameters
organizationId— The ID of the organization the member belongs to.emailAddress— The email address of the member requesting a password reset.loginRedirectUrl?— URL to redirect to if the member clicks the link but already has a valid session.resetPasswordRedirectUrl?— URL to redirect to for completing the password reset.resetPasswordExpirationMinutes?— Expiration for the reset link, in minutes.resetPasswordTemplateId?— Custom email template ID for the reset email.locale?— Locale for the email content.verifyEmailTemplateId?— Custom email template ID for an email verification step, if required.
Throws
if no member with the given email exists in the organization.
if the coroutine is cancelled.