Skip to main content

Basic Configuration

The minimum required configuration to initialize the client:

Complete Configuration Interface

Here’s the full configuration interface with all available options:

Configuration Examples

Production Configuration

Development Configuration

High-Volume Configuration

Storage Configuration

Configure message persistence and storage integration:

Storage Integration Guide

Learn more about storage configuration and features

Configuration Options Explained

API Version

The SDK defaults to the latest stable API version. Only specify a different version if you need compatibility with older API features.

Timeout Configuration

Configure request timeouts based on your use case:

Base URL Configuration

Use different endpoints for testing or custom deployments:

Environment-Based Configuration

Set up different configurations for different environments:

Configuration Validation

The SDK automatically validates your configuration and provides helpful error messages:

Runtime Configuration Updates

Get and verify current configuration:

Configuration Best Practices

1. Environment Variables

2. Configuration Factory Pattern

3. Configuration with Secrets Management

Framework-Specific Configuration

Next.js Configuration

Express.js Configuration

NestJS Configuration

Troubleshooting Configuration Issues

Ensure all required environment variables are set:
Make sure you’re loading environment variables:
Increase the timeout value based on your network conditions:
Use a supported API version:
Ensure webhook token matches Meta configuration:

Next Steps

Core Concepts

Learn about the SDK’s internal architecture and design

Error Handling

Understand error types and handling strategies

Webhook Setup

Configure webhooks for receiving messages

Production Guide

Deploy your configuration to production