Quick Start Guide
Get up and running with the WhatsApp API in under 5 minutes. Send your first message and start building amazing applications.
Prerequisites: You'll need a valid phone number for WhatsApp Business API registration. Personal WhatsApp numbers cannot be used.
1
Get Your API Key
Sign up for a free account and generate your API key
Create an account
Sign up at our registration page
Verify your phone number
Complete WhatsApp Business verification process
Generate API key
Create your first API key in the dashboard
2
Install SDK or Use REST API
Choose your preferred method to interact with our API
Install via npm
npm install whatsapp-api-client
3
Send Your First Message
Send a simple text message to test your integration
Send a text message
import { WhatsAppAPI } from 'whatsapp-api-client';
const client = new WhatsAppAPI({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://api.whatsappapi.dev'
});
async function sendMessage() {
try {
const result = await client.messages.send({
to: '+1234567890', // Replace with recipient's number
type: 'text',
text: {
body: 'Hello! This is my first WhatsApp API message 🎉'
}
});
console.log('Message sent successfully:', result.id);
} catch (error) {
console.error('Error sending message:', error);
}
}
sendMessage();
Replace
YOUR_API_KEY
with your actual API key and +1234567890
with a valid WhatsApp number (including country code).4
Handle the Response
Understand the API response and handle success/error cases
Successful Response
200 OK - Message queued successfully
{
"success": true,
"data": {
"id": "msg_1234567890abcdef",
"status": "queued",
"to": "+1234567890",
"timestamp": "2024-01-15T10:30:00Z"
}
}
Error Response
400 Bad Request - Invalid phone number
{
"error": true,
"code": "INVALID_PHONE_NUMBER",
"message": "The phone number provided is not a valid WhatsApp number",
"details": {
"field": "to",
"value": "+1234567890"
}
}
What's Next?
Now that you've sent your first message, explore more advanced features