Setup
1. Install
npm install @boostgpt/router
WHATSAPP_CONTACTS=2349012345678,2349087654321
Usage
import { Router, WhatsAppAdapter } from '@boostgpt/router';
const router = new Router({
apiKey: process.env.BOOSTGPT_API_KEY,
projectId: process.env.BOOSTGPT_PROJECT_ID,
adapters: [
new WhatsAppAdapter({
allowedContacts: process.env.WHATSAPP_CONTACTS.split(','),
useLocalAuth: true
})
]
});
await router.start();
// Scan QR code when prompted
Options
Whitelist of phone numbers (with country code, no +)
QR Code
Scan the QR code with WhatsApp on your phone to authenticate.
The first time you run it, scan the QR code. Sessions are saved locally for subsequent runs.