# Send SMS Verification — FraudLabs Pro

> Send an SMS with verification code and a custom message for authentication purpose. NOTE: Make sure you have enough SMS credits to send any verification SMS. See the documentation

- Key: `fraudlabs_pro-send-sms-verification`
- Type: Action (Write)
- Version: 0.0.7
- App: FraudLabs Pro (`fraudlabs_pro`) — https://pipedream.com/apps/fraudlabs-pro.md
- This page (HTML): https://pipedream.com/apps/fraudlabs-pro/actions/send-sms-verification
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/fraudlabs_pro/actions/send-sms-verification/send-sms-verification.mjs

## Description

Send an SMS with verification code and a custom message for authentication purpose. NOTE: Make sure you have enough SMS credits to send any verification SMS. [See the documentation](https://www.fraudlabspro.com/developer/api/send-sms-verification)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `tel` | `string` | Yes | The recipient mobile phone number in E164 format which is a plus followed by just numbers with no spaces or parentheses. For example, +12015550123 |
| `mesg` | `string` | Yes | The message template for the SMS. Add <otp> as placeholder for the actual OTP to be generated. Max length is 140 characters. For example, Your OTP for the transaction is <otp> |
| `countryCode` | `string` | No | (optional) ISO 3166 country code for the recipient mobile phone number. If parameter is supplied, then some basic telephone number validation is done. |
| `format` | `string` | No | (optional) Format of the result. Available values are json or xml. If unspecified, json format will be used for the response message. |
| `otpTimeout` | `string` | No | (optional) Timeout feature for OTP value in seconds. Default is 3600 seconds(1 hour). Min timeout is 15 seconds whereas max timeout is 86400 seconds(24 hours). |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "fraudlabs_pro",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "fraudlabs_pro-send-sms-verification",
  arguments: {
    tel: "Telephone Number",
    mesg: "Message",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "fraudlabs_pro-send-sms-verification",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    fraudlabs_pro: { authProvisionId: "apn_xxxxxxx" },
    tel: "Telephone Number",
    mesg: "Message",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "fraudlabs_pro-send-sms-verification",
    "configured_props": {
      "fraudlabs_pro": { "authProvisionId": "apn_xxxxxxx" },
      "tel": "Telephone Number",
      "mesg": "Message"
    }
  }'
```

---

- App: https://pipedream.com/apps/fraudlabs-pro.md · All apps: https://pipedream.com/apps
