Use these commands in page workflows to check reCAPTCHA before accepting a form submission. Configure your keys first; see Page Settings and the existing reCAPTCHA guide.
Generates a token for the current interaction. This command has no input fields and returns text. Give its result a Return as name so you can select it in the next command.
Select the generated token in token. This command returns the verification result, which you can use when deciding whether the workflow should continue.
Select the generated token in token. This command reports an error if the token is invalid. Use it when a failed check should prevent the protected action from continuing, and handle the error with a helpful message.
Enter the site key in Settings → Pages Settings → reCAPTCHA Site Key, and the secret key in Settings → API Settings → reCAPTCHA Secret Key. Keep the secret key out of page content and shared examples. Do not reuse a captured token as a permanent value; generate a token for the interaction you are checking.
Error Handling
When building applications with Twidget, you may encounter situations where you need to handle errors gracefully to ensure your application runs smoothly. Twidget provides two powerful commands for error handling: `try-catch` and `throw-error`. This documentation will guide you on how to use these c...
Send External HTTP Request
Using Twidget, you can send external HTTP requests effortlessly. This functionality allows you to communicate with external servers or APIs. Below, you will find the necessary parameters and structure to set up an HTTP request. Parameters. - URL: The endpoint to which the request will be sent. - Met...
Send Message
Send SMS Command. With Twidget, you can send SMS messages to phones using the `Send SMS` command. This functionality varies depending on the provider. Currently, we support Twilio as the SMS provider. To use Twilio for SMS integrations, you will need: - A Twilio account ID - Twilio Auth Token - A Tw...
Return
The `return` command in Twidget is a special command used to halt the current command workflow and immediately return a specified result. This command overrides any subsequent processes and outputs the return result regardless of the rest of the workflow logic. This command is particularly useful fo...
Loops
In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks. List Loop. The `List Loop` command enables you to loop thr...