Professionelle WhatsApp API für Unternehmen mit Multi-Session Support, ChatBot-Funktionen und Enterprise-Features.
Mehrere WhatsApp-Accounts gleichzeitig verwalten
Webhooks und Message History für ChatBots
API Keys, Rate Limiting, Monitoring
https://wa.outrnk.io
Die API verwendet API Keys für die Authentifizierung. Jede Instanz hat einen eigenen API Key.
curl -X POST https://wa.outrnk.io/api/send-message \
-H "X-API-Key: wapi_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "491234567890", "message": "Hello!"}'
curl -X POST https://wa.outrnk.io/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "your_password"}'
/api/send-message
Sendet eine WhatsApp-Nachricht an eine Telefonnummer.
{
"phone": "491234567890",
"message": "Hallo! Das ist eine Test-Nachricht."
}
{
"success": true,
"data": {
"messageId": "3EB0C767D26A1B2C5F",
"phone": "491234567890",
"status": "sent"
}
}
/api/send-bulk
Sendet Nachrichten an mehrere Empfänger gleichzeitig.
{
"messages": [
{"phone": "491234567890", "message": "Hallo Person 1!"},
{"phone": "491234567891", "message": "Hallo Person 2!"}
]
}
Spezielle APIs für die Entwicklung von ChatBots mit Message History und Webhook-Support.
/api/instances/{id}/chats
Ruft alle Chats mit der letzten Nachricht ab.
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
https://wa.outrnk.io/api/instances/INSTANCE_ID/chats
{
"success": true,
"data": [
{
"chatId": "491234567890@c.us",
"lastMessage": {
"id": "3EB0C767D26A1B2C5F",
"body": "Hallo!",
"timestamp": 1703123456789,
"isFromMe": false,
"contactName": "Max Mustermann"
},
"messageCount": 15
}
]
}
/api/instances/{id}/chats/{chatId}/messages
Ruft Nachrichten eines bestimmten Chats ab.
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
"https://wa.outrnk.io/api/instances/INSTANCE_ID/chats/491234567890@c.us/messages?limit=50"
/api/instances/{id}/messages/recent
Ruft die neuesten Nachrichten über alle Chats ab.
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
"https://wa.outrnk.io/api/instances/INSTANCE_ID/messages/recent?limit=100"
Konfiguriere Webhooks um über eingehende Nachrichten und Events benachrichtigt zu werden.
/api/instances/{id}/webhook
Konfiguriert eine Webhook-URL für eine Instanz.
{
"url": "https://your-bot.com/webhook",
"secret": "optional-secret-for-hmac"
}
{
"event": "message",
"instanceId": "instance-uuid",
"timestamp": 1703123456789,
"data": {
"id": "3EB0C767D26A1B2C5F",
"chatId": "491234567890@c.us",
"from": "491234567890@c.us",
"body": "Hallo Bot!",
"isFromMe": false,
"contactName": "Max Mustermann",
"timestamp": 1703123456789
}
}
message
Eingehende Nachricht empfangen
message_sent
Nachricht erfolgreich gesendet
message_ack
Nachricht zugestellt/gelesen
ready
WhatsApp-Instanz verbunden
http://57.129.5.88:3010/api/check-number/{phone}
Prüft ob eine Telefonnummer auf WhatsApp registriert ist.
Hinweis: Diese API ist nur direkt über den Instance-Port erreichbar.
curl http://57.129.5.88:3010/api/check-number/491234567890
{
"success": true,
"data": {
"phone": "491234567890",
"registered": true,
"whatsappId": "491234567890@c.us"
}
}
http://57.129.5.88:3010/api/contact/{phone}
Ruft Kontaktinformationen ab.
{
"success": true,
"data": {
"id": "491234567890@c.us",
"name": "Max Mustermann",
"pushname": "Max",
"number": "491234567890",
"isBlocked": false,
"isBusiness": false
}
}
const express = require('express');
const axios = require('axios');
const app = express();
app.use(express.json());
const CONFIG = {
whatsappApiUrl: 'https://wa.outrnk.io',
apiKey: 'wapi_YOUR_API_KEY'
};
// Webhook Endpoint
app.post('/webhook', async (req, res) => {
const { event, data } = req.body;
if (event === 'message' && !data.isFromMe) {
const phone = data.from.replace('@c.us', '');
const message = data.body.toLowerCase();
let response = null;
if (message.includes('hallo')) {
response = `Hallo ${data.contactName}! Wie kann ich dir helfen?`;
} else if (message.includes('hilfe')) {
response = 'Verfügbare Befehle: hallo, hilfe, zeit';
} else if (message.includes('zeit')) {
response = `Aktuelle Zeit: ${new Date().toLocaleString('de-DE')}`;
}
if (response) {
await axios.post(`${CONFIG.whatsappApiUrl}/api/send-message`, {
phone,
message: response
}, {
headers: { 'X-API-Key': CONFIG.apiKey }
});
}
}
res.json({ success: true });
});
app.listen(4000, () => {
console.log('ChatBot läuft auf Port 4000');
});
import requests
import json
API_URL = "https://wa.outrnk.io"
API_KEY = "wapi_YOUR_API_KEY"
def send_message(phone, message):
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
data = {
"phone": phone,
"message": message
}
response = requests.post(
f"{API_URL}/api/send-message",
headers=headers,
json=data
)
return response.json()
# Nachricht senden
result = send_message("491234567890", "Hallo von Python!")
print(result)
{
"success": false,
"error": "WhatsApp not connected",
"code": "WHATSAPP_DISCONNECTED"
}
Die API implementiert intelligentes Rate Limiting um WhatsApp-Sperren zu vermeiden: