You can use other method or library to generate captcha code . Captcha code is optional for Login or Register with OTP | Fynd Partners Help Center (loginWithOTP) method.
const response = await applicationClient.user.loginWithOTP({
body:{
"country_code": "91",
"mobile": "1234567890"
}
});