Skip to main content

How to send an OTP via SMS

Updated this week

How to send a OTP via SMS

You can use ClickSend to setup 2 Factor Authentication for your App/website. To do this:

  1. Generate the OTP in your code e.g. "1234" and store it (in a database on your server).

  2. Call our POST sms/send endpoint.

  3. Allow the user to input the OTP.

  4. Your script should validate it against the stored OTP.

It's recommended that you put in limits for the maximum times a user can send a OTP and also how many times they can attempt to guess the OTP.

Did this answer your question?