Passwordless custom gateway

I’m trying to create an option to send the OTP using WhatsApp every time the user cannot receive an SMS. What I would like to know is if it’s possible to capture the OTP before it reaches the user and redirect it to a custom gateway.
I was able to generate a custom gateway for the SMS, but i’m having a hard time replicating with WhatsApp. For this case i’m considering using Twilio because it’s optional.

@lautarov Did you find a solution? I’m looking to achieve the same to send OTP via Whatsapp channel. I’ve got the Twilio APIs to send the whatsapp notifications.