Telegram_2025-03-13T14

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2025 > 03 > 13 >

Telegram_2025-03-13T14

Telegram link

 

2025-03-13T14:02:18

 

- generate your OTP using a function to generate random stuff, e.g.:

 

type: pre function GenerateOTP: string;

 

var

 

i: Integer;

 

begin

 

Result := '';

 

for i := 1 to 6 do

 

Result := Result + IntToStr(Random(10));

 

end; language:

 


 

Telegram link

 

2025-03-13T14:03:24

 

- save this OTP in your DB linked to the user that requested it. Add a expiration time (e.g. 1 to 3 minutes would be enough)

 


 

Telegram link

 

2025-03-13T14:04:38

 

- Send it to the user using your WhatsApp API (you can use Indy or IW internal HTTP client classes which I recommend)

 


 

Telegram link

 

2025-03-13T14:05:13

 

- When the user provides the OTP compare it with the one saved in the DB. Check the expiration.

 

- Grant or deny access based on the result.

 

That's it