Actions3
- Account Actions
- OTP Actions
Overview
This node integrates with the Authentica API to send One-Time Passwords (OTPs) via multiple communication channels and verify them. It supports sending OTPs through SMS, WhatsApp, or Email, making it useful for user authentication, two-factor verification, or secure access scenarios. For example, a business can use this node to send an OTP to a user's phone or email during login or transaction confirmation, enhancing security.
Properties
| Name | Meaning |
|---|---|
| Method | The channel to send the OTP: Email, SMS, or WhatsApp. |
| Phone | The recipient's phone number in E.164 format (e.g., +9665XXXXXXXX). Required if Method is SMS or WhatsApp. |
| The recipient's email address. Required if Method is Email. | |
| Include Raw Response | Whether to attach the full raw API response under the raw field for debugging purposes. |
Output
The node outputs JSON data with the following structure when sending an OTP:
success: A boolean indicating the OTP was sent successfully.- If "Include Raw Response" is enabled, the full API response is included under the
rawproperty.
When verifying an OTP (not requested here but part of the node):
verified: A boolean indicating whether the OTP verification succeeded.- Optionally includes the raw API response if enabled.
No binary data output is produced by this node.
Example output when sending an OTP successfully:
{
"success": true,
"raw": { /* full API response object, if enabled */ }
}
Dependencies
- Requires an API key credential for the Authentica service configured in n8n.
- Uses the Authentica API endpoint (default base URL:
https://api.authentica.sa). - Network connectivity to Authentica API endpoints
/api/v2/send-otpfor sending OTPs.
Troubleshooting
- Invalid Phone Number Format: The phone number must be in E.164 format (e.g., +9665XXXXXXXX). If invalid, the node throws an error "Phone must be E.164, e.g. +9665XXXXXXX".
- Invalid Email Address: The email must be valid according to a basic regex check. Otherwise, the node throws "Email is not valid".
- API Request Failures: Errors from the Authentica API will be thrown as node errors. Check your API credentials and network connectivity.
- Include Raw Response: Enabling this helps debug issues by providing the full API response.
Links and References
- Authenica API Documentation (assumed base URL, consult actual docs)
- E.164 Phone Number Format
- Email Validation Basics