Skip to main content

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

PlanSessionsMessages/MinPrice
Trial1 session10 messagesFree (7 days)
Starter5 sessions30 messagesContact for pricing
Professional20 sessions100 messagesContact for pricing
EnterpriseUnlimitedCustom limitsContact 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:

  1. API Base URL: https://api.chatwhatsapp.in (or your custom endpoint)
  2. Admin API Key: wamk_xxxxxxxxxxxxx (for managing sessions)
  3. Dashboard Access: To monitor usage and manage sessions
Save Your Credentials

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."
}
Save Your Session API Key

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

  1. 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
  2. Open WhatsApp on Your Phone

    • Open WhatsApp
    • Go to SettingsLinked Devices
    • Tap Link a Device
    • Scan the QR code displayed
  3. 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:

CountryFormatExample
India91XXXXXXXXXX919876543210
USA1XXXXXXXXXX14155552671
UK44XXXXXXXXXX447911123456
UAE971XXXXXXXXX971501234567
Phone Number Tips
  • ✅ 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:

StateDescription
creatingSession is being created
startingContainer is starting
qr_readyQR code is ready to scan
connectingConnecting to WhatsApp
ready✅ Authenticated and ready to use
disconnectedTemporarily disconnected (will auto-reconnect)
failedFailed to connect
stoppedManually stopped
logged_outLogged out from WhatsApp

What You Can Do Next

Now that you have a working session, explore these features:

📨 Send Different Message Types

👥 Manage Groups

🔔 Set Up Webhooks

💻 Code Examples

📚 Learn More

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!

Useful Resources