Quick Start Guide
Send your first WhatsApp message in 5 minutes with this quick start guide.
5-Minute Setup
Follow this guide to send your first message quickly. Make sure you have your API key ready.
1. Install the SDK
# Using npm npm install @amanahagent/sdk # Using yarn yarn add @amanahagent/sdk # Using Python pip install amanahagent
2. Initialize the Client
// JavaScript/TypeScript import { AmanahAgent } from '@amanahagent/sdk'; const client = new AmanahAgent({ apiKey: 'YOUR_API_KEY', environment: 'production' });
# Python from amanahagent import AmanahAgent client = AmanahAgent( api_key='YOUR_API_KEY', environment='production' )
3. Send Your First Message
// JavaScript/TypeScript const response = await client.messages.send({ to: '+1234567890', message: 'Hello from AmanahAgent!', type: 'text' }); console.log('Message sent:', response.messageId); console.log('Status:', response.status);
# Python response = client.messages.send( to='+1234567890', message='Hello from AmanahAgent!', type='text' ) print(f'Message sent: {response.message_id}') print(f'Status: {response.status}')
Response Example
{ "messageId": "msg_abc123xyz789", "status": "sent", "to": "+1234567890", "timestamp": "2024-01-15T10:30:00Z", "credits": 1 }
Next Steps
Set up Webhooks
Receive real-time message updates
Explore API Reference
Learn about all available endpoints
Read Guides
Learn best practices and patterns
SDK Documentation
Language-specific documentation
Pro Tip: Use the sandbox environment for testing by setting environment: 'sandbox'
in your client configuration.