The One-time password check block verifies the password and its correspondence to the user's contact ID — for example, phone number or e-mail. It may be required for authorization on the site, order confirmation in an online store or payments.
In order to create a password, you can use the One-time password generation block. Use the Incoming webhook block to have the One-time password check block receive a password verification request from an external service and return the result.
How to set up the block
- In the Script Editor, add the One-time password check block to the workspace.
- Specify the client ID - phone number, e-mail or other data requested by the form on the site. You can use a variable in the field.
- Set the password. You can use a variable in the field.
- Once the block has worked in the script, you can get the results.
- data.auth — password verification;
- data.contact_indicator_exist — contact ID;
- data.remaining_end_time — password lifetime;
- data.is_used — password usage;
- data — all the results.
Script example
The user enters e-mail and phone number in the authorization form on the site. The Incoming webhook block passes the information to the chatbot, the One-time password check block verifies the password and correlates it with the user ID, then the Incoming webhook block returns the result of the check to the site.