A powerful API for WhatsApp message automation with user management and security features.
The API uses API key authentication. To obtain an API key:
x-api-key header for authenticated requests.
                https://wh.invnty.com/api
                Retrieve user dashboard information.
Send WhatsApp message.
{
    "phoneNumber": "string",    Ex: +96478xxxxxxxx
    "code": "string",           Ex: 218182
    "language": "string"        EX: ar or en
}import requests
BASE_URL = 'https://wh.invnty.com/api'
# Example usage:
def get_dashboard(api_key):
    """Get user dashboard information."""
    headers = {'x-api-key': api_key}
    response = requests.get(f'{BASE_URL}/dashboard', headers=headers)
    return response.json()
def send_message(api_key, phone_number, code, language='ar'):
    """Send OTP message."""
    headers = {'x-api-key': api_key}
    response = requests.post(f'{BASE_URL}/send-message', 
        headers=headers,
        json={
            'phoneNumber': phone_number,
            'code': code,
            'language': language
        }
    )
    return response.json()
api_key = "ey**************************************************************" #Your API key
# Get dashboard info
dashboard = get_dashboard(api_key)
print("Dashboard info:", dashboard)
# Send OTP message
message_result = send_message(
    api_key=api_key,
    phone_number="+9647832000002",
    code="823476",
    language="en"
)
print("Message send result:", message_result)
const axios = require('axios');
const BASE_URL = 'https://wh.invnty.com/api';
async function getDashboard(apiKey) {
    const headers = { 'x-api-key': apiKey };
    const response = await axios.get(`${BASE_URL}/dashboard`, { headers });
    return response.data;
}
async function sendMessage(apiKey, phoneNumber, code, language = 'ar') {
    const headers = { 'x-api-key': apiKey };
    const response = await axios.post(`${BASE_URL}/send-message`, {
        phoneNumber: phoneNumber,
        code: code,
        language: language
    }, { headers });
    return response.data;
}
const apiKey = "ey**************************************************************"; // Your API key
// Get dashboard info
getDashboard(apiKey)
    .then(dashboard => {
        console.log("Dashboard info:", dashboard);
    });
// Send OTP message
sendMessage(apiKey, "+9647832000002", "823476", "en")
    .then(messageResult => {
        console.log("Message send result:", messageResult);
    });
                            <?php
$BASE_URL = 'https://wh.invnty.com/api';
function getDashboard($apiKey) {
    global $BASE_URL;
    $headers = array(
        'x-api-key: ' . $apiKey,
    );
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $BASE_URL . '/dashboard');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}
function sendMessage($apiKey, $phoneNumber, $code, $language = 'ar') {
    global $BASE_URL;
    $headers = array(
        'x-api-key: ' . $apiKey,
        'Content-Type: application/json'
    );
    $data = json_encode(array(
        'phoneNumber' => $phoneNumber,
        'code' => $code,
        'language' => $language
    ));
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $BASE_URL . '/send-message');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}
$apiKey = "ey**************************************************************"; // Your API key
// Get dashboard info
$dashboard = getDashboard($apiKey);
print_r($dashboard);
// Send OTP message
$messageResult = sendMessage($apiKey, "+9647832000002", "823476", "en");
print_r($messageResult);
                        import 'dart:convert';
import 'package:http/http.dart' as http;
const String BASE_URL = 'https://wh.invnty.com/api';
Future<?php
                    
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
class ApiController extends Controller
{
    private $baseUrl = 'https://wh.invnty.com/api';
    public function getDashboard($apiKey)
    {
        $response = Http::withHeaders([
            'x-api-key' => $apiKey,
        ])->get("{$this->baseUrl}/dashboard");
        return $response->json();
    }
    public function sendMessage($apiKey, $phoneNumber, $code, $language = 'ar')
    {
        $response = Http::withHeaders([
            'x-api-key' => $apiKey,
        ])->post("{$this->baseUrl}/send-message", [
            'phoneNumber' => $phoneNumber,
            'code' => $code,
            'language' => $language,
        ]);
        return $response->json();
    }
}
// Example usage in a route or controller
$apiKey = "ey**************************************************************"; // Your API key
$apiController = new ApiController();
// Get dashboard info
$dashboard = $apiController->getDashboard($apiKey);
print_r($dashboard);
// Send OTP message
$messageResult = $apiController->sendMessage($apiKey, "+9647832000002", "823476", "en");
print_r($messageResult);