Technical Guide
Oracle DB (11g – 23ai)Oracle APEX (5.0 – 24.2)

WhatsApp API for Oracle APEX & PL/SQL

The Complete Integration Guide

This is the definitive guide to sending and receiving WhatsApp messages directly from your database using UTL_HTTP (raw PL/SQL) or APEX_WEB_SERVICE. Designed to be fully compatible with any Oracle Database.

Oracle APEX WhatsApp Integration

Oracle ERP users have a unique challenge: the database lives on-premise or in a private cloud, and making outbound HTTPS calls requires specific SSL wallet configuration that most tutorials skip entirely. This guide fixes that.


Version Compatibility Matrix

Oracle VersionHTTP PackageSSL Wallet Method
11g (11.2)UTL_HTTPorapki / OWM (Requires Password)
12c - 21cUTL_HTTPorapki (-auto_login)
APEX 18.x–24.xAPEX_WEB_SERVICEInstance Admin Config

One-Time Server Setup

These steps are done once per Oracle DB server to allow outbound secure connections.

ASSL Wallet Setup

⚠️ Auto-login is mandatory: Always create wallets with -auto_login. Without it, UTL_HTTP cannot open the wallet at runtime.

Windows CMD
:: Create certs folder
mkdir C:\waaibot\certs

:: Download directly from waaibot.com
curl -o "C:\waaibot\certs\gts_root_r4.crt" "https://waaibot.com/assets/certs/gts_root_r4.crt"

BNetwork ACL Setup

SQL - Run as SYSDBA
BEGIN
  DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
    host => 'api.waaibot.com',
    ace => xs$ace_type(
      privilege_list => xs$name_list('http', 'connect'),
      principal_name => 'YOUR_SCHEMA',
      principal_type => xs_acl.ptype_db)
  );
END;/

1Send a WhatsApp Message

DECLARE
  l_response CLOB;
BEGIN
  apex_web_service.g_request_headers(1).name := 'Content-Type';
  apex_web_service.g_request_headers(1).value := 'application/json';
  apex_web_service.g_request_headers(2).name := 'X-API-Key';
  apex_web_service.g_request_headers(2).value := 'YOUR_KEY';

  l_response := apex_web_service.make_rest_request(
    p_url => 'https://api.waaibot.com/api/v1/send-message',
    p_http_method => 'POST',
    p_body => '{"recipientNumber":"923022597807","message":"Hello from APEX!"}'
  );
END;/

Tutorial Complete! 🎉

Your PL/SQL environment is now equipped as a powerful, real-time messaging engine.

Build Your First Chatbot Free