Home > Software design >  how to send an otp to email using twilio in react-native
how to send an otp to email using twilio in react-native

Time:10-19

I have to send an otp to the user's email using twilio. Is there a proper way to do it? I cannot find any proper documentation aur blog telling me how to do it. I am working on react-native android project.

CodePudding user response:

Twilio developer evangelist here.

The documentation for sending verification codes to an email address using Twilio Verify is here: https://www.twilio.com/docs/verify/email.

As @spicy.dll has mentioned, you should make the API requests to Twilio from a server you control and not from your React Native application. If you make requests from your React Native app you would need to embed the API credentials somehow, and a malicious user could decompile your application, extract your credentials and abuse your Twilio account.

So, follow the docs above, host the code that calls the API and your credentials on a server and make requests to that server from your application.

  • Related