Skip to main content

8 replies

harshitb6843
June 28, 2023

You mean this interface or this method of authenticating?

If authenticating - Then you again have 2 ways. Email and SMS. For email, it is pretty simple, you generate a random 4-digit code, keep it saved in a variable and send it via Send Email smart service. Then when the user enters that code, you just validate that against the value saved in the variable. 

For SMS, you have to use an external API like Twillio.

June 28, 2023

Hi Harshit ,

i have to configure this  of method of authenticating? so if i click on link randon 4 digit OTP will generate.

and how can i  generate a random 4-digit code via email and how to show in interface.

harshitb6843
June 28, 2023

You can generate the code using rand() function. 

stefanhelzle0001
Brainy
June 28, 2023

Yeah ... well, do you mind adding a bit more detail? What do you want to achieve?

June 28, 2023

Hi Stefan ,

I have to make a functionality  like if user click on send button then he will receive an random OTP, as similar when we register on any portal they verified via OTP which we receive on mobile number.

i just want to know can i generate  random  4 digit number after every click .

stefanhelzle0001
Brainy
June 28, 2023

Yes. Did you check the rand() function?

mathieud0001
June 28, 2023

Why 4 digits?

Here is the RFC for generating proper OTPs and validating them.

[View:https://datatracker.ietf.org/doc/html/rfc6238]

srividyak8611
June 6, 2024

For email, you generate a random 4-digit code using random function and dont forgot to convert random to int and then to text, and you can use script task smart service to pass this value in expression and then use Send Email smart service.

iexample: text(int(rand(1) * 10000),"0000")