This is a Next.js project bootstrapped with create-next-app.
Copy the example environment file and fill in the values:
cp .env.example .env.localKey variables:
| Variable | Description |
|---|---|
NEXT_PUBLIC_ELIZACLOUD_API_URL |
Eliza Cloud backend URL (defaults to https://www.elizacloud.ai) |
NEXT_PUBLIC_TELEGRAM_BOT_USERNAME |
Telegram bot username from @BotFather |
NEXT_PUBLIC_TELEGRAM_BOT_ID |
Numeric Telegram bot ID (first part of bot token before :) |
NEXT_PUBLIC_DISCORD_CLIENT_ID |
Discord Application ID (from Developer Portal > General Information) |
NEXT_PUBLIC_WHATSAPP_PHONE_NUMBER |
WhatsApp Business phone number in E.164 format (e.g. +14245074963) |
See .env.example for the full list.
To enable Discord login locally, you must register your redirect URI in the Discord Developer Portal:
- Go to the Discord Developer Portal
- Select your application (matching
NEXT_PUBLIC_DISCORD_CLIENT_ID) - Navigate to OAuth2 in the left sidebar
- Under Redirects, add the following URI:
http://localhost:4444/get-started - Click Save Changes
The redirect URI must exactly match the origin where the app is running. If you deploy to a staging or production domain, add that redirect URI as well (e.g.,
https://your-domain.com/get-started).
To enable WhatsApp integration, you need a Meta Business account and a WhatsApp Business App:
- Go to Meta for Developers and create or select your app
- Add the WhatsApp product to your app
- In WhatsApp → API Setup, note your Phone Number ID and generate a temporary access token
- For production, create a System User in Meta Business Settings and generate a permanent access token with the
whatsapp_business_messagingpermission - In App Dashboard → Settings → Basic, note the App Secret (used for webhook signature verification)
- Configure the webhook URL in WhatsApp → Configuration:
- Callback URL:
https://your-domain.com/api/eliza-app/webhook/whatsapp - Verify Token: A random secret string (generate with
openssl rand -hex 32), must matchELIZA_APP_WHATSAPP_VERIFY_TOKEN - Webhook Fields: Subscribe to
messages
- Callback URL:
- Set the following environment variables in
eliza-cloud-v2:ELIZA_APP_WHATSAPP_ACCESS_TOKEN= # Permanent token from System User ELIZA_APP_WHATSAPP_PHONE_NUMBER_ID= # From WhatsApp → API Setup ELIZA_APP_WHATSAPP_APP_SECRET= # From Settings → Basic ELIZA_APP_WHATSAPP_VERIFY_TOKEN= # Generate: openssl rand -hex 32 ELIZA_APP_WHATSAPP_PHONE_NUMBER= # E.164 format (e.g. +14245074963)
For local development, use a tunneling service like ngrok to expose your local server to Meta's webhooks:
ngrok http 3000Then use the generated URL as your callback (e.g.,
https://abc123.ngrok-free.app/api/eliza-app/webhook/whatsapp). Note: the webhook endpoint is on eliza-cloud-v2 (port 3000), not eliza-app (port 4444).
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.