Receive SMS API
Receive inbound SMS messages on Maskyoo SMS phone numbers.
Overview
When you purchase an SMS-enabled phone number, you can associate it with a URL. When someone sends a text message to that number, Maskyoo makes an HTTP request to your URL.
Webhook Format
http://www.yoursite.com/yourpage.php?from=XXXXXXX&to=XXXXXXX&msg=XXXXXXXXXXXXXXXXXXX&time=2016-04-25%2010:00:00
Webhook Parameters
| Variable | Type | Description |
|---|---|---|
from | String | Sender phone number |
to | String | Destination phone number (your Maskyoo number) |
msg | String | Text message content |
time | String | Date and time in format Y-m-d H:i:s |
Example Webhook Handler (PHP)
<?php
// Receive incoming SMS webhook
$from = $_GET['from'] ?? '';
$to = $_GET['to'] ?? '';
$message = $_GET['msg'] ?? '';
$time = $_GET['time'] ?? '';
// Log the incoming message
$log = date('Y-m-d H:i:s') . " - From: $from, To: $to, Message: $message\n";
file_put_contents('sms_log.txt', $log, FILE_APPEND);
// Respond with 200 OK
http_response_code(200);
echo "OK";
?>
Setup
To configure your webhook URL:
- Log in to your Maskyoo account
- Navigate to your SMS phone number settings
- Enter your webhook URL in the designated field
- Save the settings
השפעות על המערכת
קבלת SMS נכנס מפעילה כמה מנגנונים במערכת:
- אוטומציה — הודעה נכנסת יכולה להפעיל אירוע
sms_receiveולהריץ כללי אוטומציה (שליחת מייל, URL callback, הוספת תגית) - דוח התראות — ההודעה הנכנסת נשמרת ב‑_notifications עם
from,to,msgו‑timeונראית בדוח - Webhook — המערכת שולחת HTTP GET ל‑URL המוגדר; מומלץ להחזיר 200 OK כדי שהקריאה לא תיחשב ככשל
- מספר SMS‑enabled — נדרש מספר עם יכולת SMS דו‑כיוונית; לא כל DDI תומך בקבלה
- עומס — webhook שלא עונה מהר עשוי לחסום תור הודעות נכנסות; מומלץ לטפל אסינכרונית