# Account recovery
## Initialize Recovery Flow
Get a recovery flow ID to start the process:
final result = await client.getRecoveryFlow();
Initiate email-based recovery:
final result = await client.sendEmailRecoveryFlow(flowId: result.flowId, email: userEmail,);
Send recovery code using flowId from previous step:
final result = await client.sendCodeRecoveryFlow(
flowId: flowId,
code: code
);
Finally, submit the new password using flowID from Submit Recovery Code step:
final result = await client.updatePassword(flowId: flowId, newPassword: newPassword,);
``