Actions3
- Account Actions
- OTP Actions
Overview
This node integrates with the Authentica API to verify one-time passwords (OTPs) sent to users via phone or email. It is designed to confirm that a user-provided OTP code matches the one previously sent, enabling secure verification workflows such as login confirmation, transaction validation, or multi-factor authentication.
Common scenarios include:
- Verifying a user's identity during sign-in by confirming an OTP sent to their phone number or email.
- Validating sensitive actions like password resets or financial transactions through OTP confirmation.
- Enhancing security in applications by adding an OTP verification step.
For example, after sending an OTP to a user's phone, this node can be used to verify the code they enter, ensuring it matches the one issued.
Properties
| Name | Meaning |
|---|---|
| Verify With | Choose whether to verify the OTP using a Phone number or an Email address. |
| Phone | The phone number to verify the OTP against. Must be in E.164 format (e.g., +9665XXXXXXX). Required if "Verify With" is Phone. |
| The email address to verify the OTP against. Must be a valid email format. Required if "Verify With" is Email. | |
| OTP Code | The OTP code string to verify. |
| Include Raw Response | Boolean option to attach the full raw API response under the raw field for debugging purposes. |
Output
The node outputs JSON data with the following structure:
verified: A boolean indicating whether the OTP verification was successful (truemeans verified).raw(optional): If enabled, contains the full raw API response from the Authentica service, useful for debugging.
Example output JSON:
{
"verified": true,
"raw": {
/* full API response object */
}
}
No binary data is produced by this node.
Dependencies
- Requires an API key credential for the Authentica API.
- The node makes HTTP POST requests to the Authentica API endpoints
/api/v2/verify-otp. - The base URL defaults to
https://api.authentica.sabut can be configured via credentials. - Proper configuration of the API key credential within n8n is necessary for authentication.
Troubleshooting
- Invalid Phone Format: If the phone number is not in E.164 format (e.g., missing '+' or country code), the node will throw an error stating: "Phone must be E.164, e.g. +9665XXXXXXX". Ensure the phone number includes the country code and starts with '+'.
- Invalid Email Format: If the email address does not match a standard email pattern, the node throws: "Email is not valid". Verify the email input is correctly formatted.
- API Errors: Network issues or invalid API keys may cause HTTP request failures. Check your API key credential and network connectivity.
- Incorrect OTP: If the OTP code does not match the one sent, the API response will indicate failure; the node returns
verified: false. - Enable "Include Raw Response" to get detailed API responses for debugging.