How to add OTP verification to my RASA bot

Hello, I have a bot that provides information to existing employees in the office. I want to add OTP verification to this via mobile number as some information in sensitive. How should I proceed to do so.

You can probably handle this with a custom action. You just need to find an open source tool that will do this for you, or e.g. use a twilio integration somehow

Yes, thank you @akelad, custom actions made it work, I had one additional question, my OTP and phone number entities are being overlapped in my form. whenever I ask for phone number in my form and enter it, the bot is reading it as [6740] (otp)[6740331327] (number) [1327] (otp) (had to add spaces or the editing was being weird sorry)(here 6740331327 is the phone number). To fix this I tried adding a regex([0-9]{4}) for OTP and a validate action for phone number but it still displays the above mentioned result.

@Nims007 how did you solve this problem? Can you please share it? I am having a similar problem.

in domain can you change type to “from_text” and check ?

required_slots:
  otp:
  - type: from_text

Hi @Nims007,

So, I understand that part of the phone number is confused for the OTP? If that’s the case, I thing the regex you have will no do the work.

In the validation action, perhaps you could try re.search(r’((?<!\d)\d{4}(?!\d))’, user_input) to ensure that OTP is just 4 digits.