Overview
The Lamah SMS API uses Bearer token authentication. All API requests must include a valid API token in the Authorization header.Getting Your API Token
1
Log into Dashboard
Visit https://sms.lamah.com and log into your account.
2
Navigate to Projects
Go to the Projects section in your dashboard.
3
Create or Select Project
Create a new project or select an existing one.
4
Copy API Token
Find and copy the API token from the project details page.
Using Your API Token
Include your API token in theAuthorization header of every request:
Authentication Errors
If authentication fails, you’ll receive a401 Unauthorized response:
Missing Authorization Header
Missing Authorization Header
Invalid Token Format
Invalid Token Format
Ensure your token follows the correct format: ✅ Correct:
Bearer YOUR_API_TOKEN❌ Incorrect:Expired or Invalid Token
Expired or Invalid Token
If your token is expired or invalid, generate a new one from your dashboard.
Insufficient Permissions
Insufficient Permissions
Make sure your project has the necessary permissions for the endpoint you’re trying to access.
Security Best Practices
Token Security Guidelines
- Store Securely: Store your API tokens in environment variables or secure configuration files
- Rotate Regularly: Regenerate your tokens periodically for enhanced security
- Use HTTPS: Always use HTTPS when making API requests
- Monitor Usage: Regularly monitor your API usage for any suspicious activity