by langgenius · v0.0.7
OTP verification using Plivo's Verify API.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
OTP (One-Time Password) verification plugin for Dify using Plivo's Verify API.
This plugin enables phone number verification in your Dify workflows by sending OTP codes via SMS or voice call and validating user-entered codes.
After installation, configure the plugin with your Plivo credentials:
| Field | Description |
|---|---|
| Auth ID | Your Plivo Auth ID from the console |
| Auth Token | Your Plivo Auth Token from the console |
Sends an OTP code to a phone number.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
phone_number | string | Yes | - | Destination phone number in E.164 format (e.g., +14155551234) |
channel | select | No | sms | Delivery channel: sms or voice |
app_uuid | string | No | - | Optional Plivo Verify application UUID for custom branding/settings |
{
"status": "success",
"session_id": "7a4351ec-679c-4df6-b6fb-0afde41f756b",
"phone_number": "+14155551234",
"channel": "sms"
}
The session_id is required for the subsequent verify_otp call.
Validates an OTP code entered by the user.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | The session UUID returned from send_otp |
otp_code | string | Yes | The OTP code entered by the user |
{
"status": "success",
"verified": true,
"session_id": "7a4351ec-679c-4df6-b6fb-0afde41f756b"
}
{
"status": "failed",
"verified": false,
"session_id": "7a4351ec-679c-4df6-b6fb-0afde41f756b",
"error": "invalid OTP"
}
┌─────────────────┐
│ Start Node │ User provides phone number
└────────┬────────┘
│
▼
┌─────────────────┐
│ Send OTP │ plivo_verify.send_otp
│ │ Output: session_id
└────────┬────────┘
│
▼
┌─────────────────┐
│ User Input │ Ask user for the code
│ │ they received via SMS
└────────┬────────┘
│
▼
┌─────────────────┐
│ Verify OTP │ plivo_verify.verify_otp
│ │ Input: session_id + otp_code
└────────┬────────┘
│
▼
┌─────────────────┐
│ IF Condition │ Check: verified == true
└────────┬────────┘
│
┌────┴────┐
▼ ▼
Success Failed
Add a Tool node and select plivo_verify > send_otp:
{{start.phone_number}} (from user input)sms (or voice for phone call)Add a Question node to collect the OTP code:
otp_codeAdd another Tool node and select plivo_verify > verify_otp:
{{send_otp.session_id}}{{question.otp_code}}Add an IF/Else node:
{{verify_otp.verified}} equals true| Variable | Source | Description |
|---|---|---|
{{send_otp.session_id}} | send_otp output | Session UUID for verification |
{{send_otp.phone_number}} | send_otp output | The phone number used |
{{send_otp.channel}} | send_otp output | Channel used (sms/voice) |
{{verify_otp.verified}} | verify_otp output | Boolean verification result |
{{verify_otp.status}} | verify_otp output | "success" or "failed" |
Verify phone numbers during user signup to prevent fake accounts.
Add an extra security layer by requiring OTP verification for sensitive actions.
Verify user identity before allowing password changes.
Confirm high-value transactions with OTP verification.
To customize OTP settings (brand name, code length, expiry time), create a Verify Application in the Plivo Console:
app_uuid parameter of send_otpFor users who can't receive SMS, use the voice channel:
channel: voice
The OTP code will be read aloud in a phone call.
| Error | Cause | Solution |
|---|---|---|
| "Authentication failed" | Invalid Auth ID or Token | Check credentials in Plivo Console |
| "Invalid request parameters" | Malformed phone number | Use E.164 format (+1234567890) |
| "OTP verification failed" | Wrong code or expired | Ask user to re-enter or resend OTP |
Plivo Verify API charges per verification attempt. See Plivo Pricing for current rates.