Updated qr code events and tls server
This commit is contained in:
6
config/.whatshooked-cli.example.json
Normal file
6
config/.whatshooked-cli.example.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"server_url": "http://localhost:8080",
|
||||
"auth_key": "",
|
||||
"username": "",
|
||||
"password": ""
|
||||
}
|
||||
124
config/config.example.json
Normal file
124
config/config.example.json
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"server": {
|
||||
"host": "localhost",
|
||||
"port": 8080,
|
||||
"default_country_code": "27",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"auth_key": "",
|
||||
"tls": {
|
||||
"enabled": false,
|
||||
"mode": "self-signed",
|
||||
"cert_dir": "./data/certs",
|
||||
"cert_file": "",
|
||||
"key_file": "",
|
||||
"domain": "",
|
||||
"email": "",
|
||||
"cache_dir": "./data/autocert",
|
||||
"production": false
|
||||
}
|
||||
},
|
||||
"whatsapp": [
|
||||
{
|
||||
"id": "personal",
|
||||
"type": "whatsmeow",
|
||||
"phone_number": "+1234567890",
|
||||
"session_path": "./sessions/personal",
|
||||
"show_qr": true
|
||||
},
|
||||
{
|
||||
"id": "business",
|
||||
"type": "business-api",
|
||||
"phone_number": "+9876543210",
|
||||
"business_api": {
|
||||
"phone_number_id": "123456789012345",
|
||||
"access_token": "EAAxxxxxxxxxxxx_your_access_token_here",
|
||||
"business_account_id": "987654321098765",
|
||||
"api_version": "v21.0",
|
||||
"verify_token": "my-secure-verify-token-12345"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hooks": [
|
||||
{
|
||||
"id": "message_hook",
|
||||
"name": "Message Handler",
|
||||
"url": "https://6e808bc4802f4ae89db5c7eacba24083.api.mockbin.io/messages",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token-here"
|
||||
},
|
||||
"active": true,
|
||||
"events": [
|
||||
"message.received",
|
||||
"message.sent",
|
||||
"message.delivered",
|
||||
"message.read"
|
||||
],
|
||||
"description": "Receives message events (incoming, outgoing, delivery receipts, and read receipts)"
|
||||
},
|
||||
{
|
||||
"id": "connection_hook",
|
||||
"name": "Connection Monitor",
|
||||
"url": "https://6e808bc4802f4ae89db5c7eacba24083.api.mockbin.io/status",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token-here"
|
||||
},
|
||||
"active": true,
|
||||
"events": [
|
||||
"whatsapp.connected",
|
||||
"whatsapp.disconnected"
|
||||
],
|
||||
"description": "Monitors WhatsApp connection status changes"
|
||||
},
|
||||
{
|
||||
"id": "qr_hook",
|
||||
"name": "QR Code Handler",
|
||||
"url": "https://6e808bc4802f4ae89db5c7eacba24083.api.mockbin.io/qr",
|
||||
"method": "POST",
|
||||
"active": false,
|
||||
"events": [
|
||||
"whatsapp.qr.code",
|
||||
"whatsapp.qr.timeout",
|
||||
"whatsapp.qr.error"
|
||||
],
|
||||
"description": "Handles QR code events during pairing"
|
||||
},
|
||||
{
|
||||
"id": "all_events_logger",
|
||||
"name": "All Events Logger",
|
||||
"url": "https://6e808bc4802f4ae89db5c7eacba24083.api.mockbin.io/all",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token-here"
|
||||
},
|
||||
"active": false,
|
||||
"description": "Receives ALL events (no events field means subscribe to everything)"
|
||||
}
|
||||
],
|
||||
"media": {
|
||||
"data_path": "./data/media",
|
||||
"mode": "link",
|
||||
"base_url": "http://localhost:8080"
|
||||
},
|
||||
"database": {
|
||||
"type": "postgres",
|
||||
"host": "localhost",
|
||||
"port": 5432,
|
||||
"username": "whatshooked",
|
||||
"password": "your_password_here",
|
||||
"database": "whatshooked",
|
||||
"sqlite_path": "./data/events.db"
|
||||
},
|
||||
"event_logger": {
|
||||
"enabled": false,
|
||||
"targets": [
|
||||
"file",
|
||||
"sqlite"
|
||||
],
|
||||
"file_dir": "./data/events",
|
||||
"table_name": "event_logs"
|
||||
},
|
||||
"log_level": "info"
|
||||
}
|
||||
39
config/config.https-custom.example.json
Normal file
39
config/config.https-custom.example.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"server": {
|
||||
"host": "0.0.0.0",
|
||||
"port": 8443,
|
||||
"default_country_code": "27",
|
||||
"auth_key": "your-secure-api-key-here",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"mode": "custom",
|
||||
"cert_file": "/etc/ssl/certs/whatshooked.crt",
|
||||
"key_file": "/etc/ssl/private/whatshooked.key"
|
||||
}
|
||||
},
|
||||
"whatsapp": [
|
||||
{
|
||||
"id": "personal",
|
||||
"type": "whatsmeow",
|
||||
"phone_number": "+1234567890",
|
||||
"session_path": "./sessions/personal",
|
||||
"show_qr": true
|
||||
}
|
||||
],
|
||||
"hooks": [
|
||||
{
|
||||
"id": "message_hook",
|
||||
"name": "Message Handler",
|
||||
"url": "https://example.com/webhook",
|
||||
"method": "POST",
|
||||
"active": true,
|
||||
"events": ["message.received"]
|
||||
}
|
||||
],
|
||||
"media": {
|
||||
"data_path": "./data/media",
|
||||
"mode": "link",
|
||||
"base_url": "https://whatshooked.example.com"
|
||||
},
|
||||
"log_level": "info"
|
||||
}
|
||||
41
config/config.https-letsencrypt.example.json
Normal file
41
config/config.https-letsencrypt.example.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"server": {
|
||||
"host": "0.0.0.0",
|
||||
"port": 443,
|
||||
"default_country_code": "27",
|
||||
"auth_key": "your-secure-api-key-here",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"mode": "autocert",
|
||||
"domain": "whatshooked.example.com",
|
||||
"email": "admin@example.com",
|
||||
"cache_dir": "./data/autocert",
|
||||
"production": true
|
||||
}
|
||||
},
|
||||
"whatsapp": [
|
||||
{
|
||||
"id": "personal",
|
||||
"type": "whatsmeow",
|
||||
"phone_number": "+1234567890",
|
||||
"session_path": "./sessions/personal",
|
||||
"show_qr": true
|
||||
}
|
||||
],
|
||||
"hooks": [
|
||||
{
|
||||
"id": "message_hook",
|
||||
"name": "Message Handler",
|
||||
"url": "https://example.com/webhook",
|
||||
"method": "POST",
|
||||
"active": true,
|
||||
"events": ["message.received"]
|
||||
}
|
||||
],
|
||||
"media": {
|
||||
"data_path": "./data/media",
|
||||
"mode": "link",
|
||||
"base_url": "https://whatshooked.example.com"
|
||||
},
|
||||
"log_level": "info"
|
||||
}
|
||||
38
config/config.https-self-signed.example.json
Normal file
38
config/config.https-self-signed.example.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"server": {
|
||||
"host": "0.0.0.0",
|
||||
"port": 8443,
|
||||
"default_country_code": "27",
|
||||
"auth_key": "your-secure-api-key-here",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"mode": "self-signed",
|
||||
"cert_dir": "./data/certs"
|
||||
}
|
||||
},
|
||||
"whatsapp": [
|
||||
{
|
||||
"id": "personal",
|
||||
"type": "whatsmeow",
|
||||
"phone_number": "+1234567890",
|
||||
"session_path": "./sessions/personal",
|
||||
"show_qr": true
|
||||
}
|
||||
],
|
||||
"hooks": [
|
||||
{
|
||||
"id": "message_hook",
|
||||
"name": "Message Handler",
|
||||
"url": "https://example.com/webhook",
|
||||
"method": "POST",
|
||||
"active": true,
|
||||
"events": ["message.received"]
|
||||
}
|
||||
],
|
||||
"media": {
|
||||
"data_path": "./data/media",
|
||||
"mode": "link",
|
||||
"base_url": "https://localhost:8443"
|
||||
},
|
||||
"log_level": "info"
|
||||
}
|
||||
Reference in New Issue
Block a user