Getting Started
This guide will walk you through getting started with the WhatsApp API - from selecting a plan to sending your first message.
Step 1: Choose Your Plan
Visit TweekersNut Network and select a plan that fits your needs:
Available Plans
| Plan | Sessions | Messages/Min | Price |
|---|---|---|---|
| Trial | 1 session | 10 messages | Free (7 days) |
| Starter | 5 sessions | 30 messages | Contact for pricing |
| Professional | 20 sessions | 100 messages | Contact for pricing |
| Enterprise | Unlimited | Custom limits | Contact for pricing |
What You Get
- ✅ REST API access
- ✅ Webhook support
- ✅ Real-time message delivery
- ✅ Group management
- ✅ Broadcast lists
- ✅ Scheduled messages
- ✅ 24/7 support
Step 2: Get Your API Credentials
After purchasing a plan, you'll receive:
- API Base URL:
https://api.chatwhatsapp.in(or your custom endpoint) - Admin API Key:
wamk_xxxxxxxxxxxxx(for managing sessions) - Dashboard Access: To monitor usage and manage sessions
Store your API key securely! You'll need it for all API requests.
Step 3: Create Your First Session
A session represents a WhatsApp connection. Each session is linked to one WhatsApp number.
Create a Session
Use your admin API key to create a new session:
curl -X POST https://api.chatwhatsapp.in/sessions/create \
-H "X-API-Key: wamk_your_admin_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "my-business-whatsapp",
"webhookUrl": "https://yourdomain.com/webhook"
}'
Parameters:
name- A friendly name for your session (e.g., "Customer Support", "Sales Team")webhookUrl- (Optional) URL to receive webhook events
Response:
{
"success": true,
"session": {
"id": "e67a00be-ed45-4356-9488-049cabb9895d",
"name": "my-business-whatsapp",
"state": "starting",
"createdAt": "2026-02-01T12:00:00.000Z"
},
"apiKey": "wask_d5726b79a64573672bd70fa06f3632ea3c6af7781588d98e",
"warning": "IMPORTANT: Save this API key securely! It will NOT be shown again."
}
The session API key (wask_...) is shown only once during creation. Save it securely! You'll need it to send messages and manage this session.
Step 4: Connect Your WhatsApp
Get the QR Code
Wait 10-15 seconds for the session to initialize, then retrieve the QR code:
curl -H "X-API-Key: wask_your_session_key_here" \
https://api.chatwhatsapp.in/sessions/e67a00be-ed45-4356-9488-049cabb9895d/qr
Response:
{
"success": true,
"qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
Scan the QR Code
-
Display the QR Code
- Use the base64 image data to display the QR code in your application
- Or decode it and save as an image file
-
Open WhatsApp on Your Phone
- Open WhatsApp
- Go to Settings → Linked Devices
- Tap Link a Device
- Scan the QR code displayed
-
Wait for Connection
- The session will automatically connect
- You'll receive a webhook notification when ready (if configured)
Check Connection Status
Verify your session is connected:
curl -H "X-API-Key: wask_your_session_key_here" \
https://api.chatwhatsapp.in/sessions/e67a00be-ed45-4356-9488-049cabb9895d/status
Response when connected:
{
"success": true,
"session": {
"id": "e67a00be-ed45-4356-9488-049cabb9895d",
"name": "my-business-whatsapp",
"state": "ready",
"phoneNumber": "919876543210",
"createdAt": "2026-02-01T12:00:00.000Z",
"lastActivity": "2026-02-01T12:05:00.000Z"
}
}
✅ When state is "ready", your session is connected and ready to send messages!
Step 5: Send Your First Message
Now that your session is connected, you can send messages!
curl -X POST https://api.chatwhatsapp.in/sessions/e67a00be-ed45-4356-9488-049cabb9895d/send \
-H "X-API-Key: wask_your_session_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "919876543210",
"text": "Hello! This is my first message from the API 🚀"
}'
Parameters:
to- Recipient's phone number with country code (no + sign)text- Your message text (supports emojis)
Response:
{
"success": true,
"messageId": "3EB0ABC123456789",
"to": "919876543210@s.whatsapp.net",
"type": "text",
"status": "sent",
"timestamp": "2026-02-01T12:10:00.000Z"
}
🎉 Congratulations! You've successfully sent your first WhatsApp message via the API!
Phone Number Format
Always use the international format with country code:
| Country | Format | Example |
|---|---|---|
| India | 91XXXXXXXXXX | 919876543210 |
| USA | 1XXXXXXXXXX | 14155552671 |
| UK | 44XXXXXXXXXX | 447911123456 |
| UAE | 971XXXXXXXXX | 971501234567 |
- ✅ Include country code (e.g., 91 for India)
- ✅ Remove the + sign
- ✅ Remove spaces and dashes
- ❌ Don't use:
+91 98765 43210 - ✅ Use:
919876543210
Session States
Your session will go through these states:
| State | Description |
|---|---|
creating | Session is being created |
starting | Container is starting |
qr_ready | QR code is ready to scan |
connecting | Connecting to WhatsApp |
ready | ✅ Authenticated and ready to use |
disconnected | Temporarily disconnected (will auto-reconnect) |
failed | Failed to connect |
stopped | Manually stopped |
logged_out | Logged out from WhatsApp |
What You Can Do Next
Now that you have a working session, explore these features:
📨 Send Different Message Types
- Images - Send photos with captions
- Documents - Send PDFs, files
- Videos - Send video messages
- Locations - Share location pins
👥 Manage Groups
- Create Groups - Create WhatsApp groups
- Add Members - Manage participants
- Send to Groups - Broadcast to groups
🔔 Set Up Webhooks
- Receive Messages - Get incoming messages
- Track Status - Monitor delivery status
- Auto-Reply Bot - Build automated responses
💻 Code Examples
- PHP Integration - Complete PHP examples
- Node.js Integration - JavaScript/TypeScript examples
- Python Integration - Python implementation
📚 Learn More
- Authentication - API key management
- Rate Limits - Understand usage limits
- Error Handling - Handle errors properly
Troubleshooting
QR Code Not Available
Problem: Can't retrieve QR code after creating session
Solutions:
- Wait 10-15 seconds after session creation
- Check session status - it should be
qr_ready - Try refreshing the QR code request
- Contact support if issue persists
Session Not Connecting
Problem: QR code scanned but session not connecting
Solutions:
- Ensure your phone has stable internet
- Check WhatsApp is updated to latest version
- Try logging out from linked devices and scan again
- Verify the session state using the status endpoint
Message Not Sending
Problem: Getting errors when sending messages
Solutions:
- Verify session state is
ready - Check phone number format (include country code, no + sign)
- Ensure recipient number is on WhatsApp
- Check you haven't exceeded rate limits
- Verify API key is correct
API Key Issues
Problem: Getting authentication errors
Solutions:
- Use session API key (
wask_...) for sending messages - Use admin API key (
wamk_...) for creating sessions - Ensure key is in header:
X-API-Key: wask_... - Check key hasn't been deactivated
Getting Help
Need assistance? We're here to help!
- 📧 Email Support: support@tweekersnut.network
- 💬 Live Chat: Available on TweekersNut Network
- 📖 Documentation: Browse our API Reference
- 🐛 Report Issues: Contact our support team