Gateway & Real-time Stream

High Performance SMS & OTP API

Streamline OTP reception, range forwarding, and automated verification with low-latency REST & WebSocket protocols.

GET Messages & OTPs
Fetch received OTPs with pagination, service detection, and ISO 8601 Indian Standard Time (IST) timestamps.
/v1/messages?key={API_KEY}
WSS Real-time WebSocket
Instant real-time push streaming for incoming SMS directly as they arrive on the device.
/v1/ws?key={API_KEY}
APK Android App Release
Download the official MRJ IVAS API Android application package (v1.1 Build 16).
/v1/apk

Authentication

Access to received OTPs is authenticated using your unique API key provided in the Android Application. Pass your key via the key query parameter on every request.

Default Demo Key
Typing here automatically updates all code examples, REST URLs, and WebSocket parameters below in real time.
URL Authentication Example
https://iva-api.tempnum.qzz.io/v1/messages?key=YOUR_API_KEY

REST API: Fetch Messages

Retrieve paged OTP records sorted chronologically. Dates are returned in ISO 8601 format with Indian Standard Time (+05:30) offset.

GET /v1/messages (Alias: /v1/msg)
Parameter Type Default Description
key string required Your API key (starts with ivs_)
page integer 1 Page number to retrieve
limit integer 20 Number of messages per page (max: 100)
all boolean false Set to true to return all cached messages without pagination
today boolean false Set to true to filter messages received since 12:00 AM IST today
JSON Response Format HTTP 200 OK
{
  "ok": true,
  "page": 1,
  "limit": 20,
  "total": 33,
  "total_pages": 2,
  "messages": [
    {
      "number": "263779125327",
      "otp": "732430",
      "service": "BYDFI",
      "range": "PAKISTAN 1325",
      "country": "PAKISTAN",
      "language": "English",
      "body": "[BYDFI] Verification code 732430 ...",
      "received_at": "2026-10-01T18:55:57+05:30",
      "dedup_id": "523dd34c066e67da..."
    }
  ]
}

Real-Time WebSocket Stream

Connect via WebSocket for instant event-driven OTP processing without polling.

WSS wss://iva-api.tempnum.qzz.io/v1/ws?key=YOUR_API_KEY

1. On Connection Established

The server transmits any recently received messages for initial synchronization:

Event: existing_messages
{
  "type": "existing_messages",
  "data": [
    {
      "number": "263779125327",
      "otp": "732430",
      "service": "BYDFI",
      "range": "PAKISTAN 1325",
      "country": "PAKISTAN",
      "language": "English",
      "body": "[BYDFI] Verification code 732430 ...",
      "received_at": "2026-10-01T18:55:57+05:30",
      "dedup_id": "523dd34c066e67da..."
    },
    ...
  ]
}

2. Real-Time Inbound SMS

As soon as an SMS arrives, an instant push event is broadcast:

Event: new_otp
{
  "type": "new_otp",
  "data": {
    "number": "923312961265",
    "otp": "53504",
    "service": "Telegram",
    "range": "Mali 7250",
    "country": "Mali",
    "language": "English",
    "body": "Telegram code: 53504",
    "received_at": "2026-10-01T18:55:57+05:30",
    "dedup_id": "f81e426d769864d5..."
  }
}

3. Heartbeat & Keepalive

The server sends WebSocket ping frames every 25 seconds to preserve long-lived connections through reverse proxies and NAT. Clients can also send an application ping message:

Client Ping → Server Pong
Client sends: { "type": "ping" }
Server reply: { "type": "pong" }

Implementation Examples

Python • REST Polling & Extraction
import requests

API_KEY = "YOUR_API_KEY"
URL = f"https://iva-api.tempnum.qzz.io/v1/messages?key={API_KEY}&limit=10"

response = requests.get(URL)
data = response.json()

if data.get("ok"):
    for msg in data.get("messages", []):
        print(f"[{msg['received_at']}] {msg['service']} OTP: {msg['otp']} from {msg['number']}")
Python • WebSocket Real-Time Listener (websockets)
import asyncio
import json
import websockets

API_KEY = "YOUR_API_KEY"
WS_URL = f"wss://iva-api.tempnum.qzz.io/v1/ws?key={API_KEY}"

async def listen():
    async with websockets.connect(WS_URL) as ws:
        print("Connected to MRJ IVAS Real-Time Stream")
        async for message in ws:
            packet = json.loads(message)
            if packet.get("type") == "new_otp":
                data = packet.get("data", {})
                print(f"New OTP: {data.get('service')} {data.get('otp')} for {data.get('number')}")

asyncio.run(listen())
Node.js • REST API Polling (fetch)
const API_KEY = 'YOUR_API_KEY';
const URL = `https://iva-api.tempnum.qzz.io/v1/messages?key=${API_KEY}&limit=10`;

async function fetchMessages() {
  const res = await fetch(URL);
  const data = await res.json();
  if (data.ok) {
    data.messages.forEach(msg => {
      console.log(`[${msg.received_at}] ${msg.service} OTP: ${msg.otp} from ${msg.number}`);
    });
  }
}

fetchMessages();
Node.js • WebSocket Real-Time Listener (ws)
const WebSocket = require('ws');

const key = 'YOUR_API_KEY';
const ws = new WebSocket(`wss://iva-api.tempnum.qzz.io/v1/ws?key=${key}`);

ws.on('open', () => {
  console.log('Connected to MRJ IVAS Real-Time Stream');
});

ws.on('message', (data) => {
  const packet = JSON.parse(data);
  if (packet.type === 'new_otp') {
    console.log('New OTP Received:', packet.data.service, packet.data.otp);
  }
});

Application Releases & Updates

Download the official MRJ IVAS API Android application package to manage IVAS forwarding, live monitoring, and number ranges.

Version v1.1
Build Build 16
Package com.tempnum.iva_app
Compatibility Android 7.0+
Download MRJ-IVAS-API.apk (v1.1 Build 16)