Skip to main content

Authentication

Three authentication methods are available. API Key is recommended for most integrations.

Include your API key in the X-Api-Key header with every request.

Getting Your API Key

  1. Log in to your Qlara account
  2. Navigate to SettingsAPI Keys
  3. Generate a new key or copy your existing key
  4. Store it securely (never commit to version control)

Using API Key

curl -X POST https://lora-api.agiletelecom.com/api/message-server/sms/send \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "+393901234567",
"message": "Hello from Qlara!"
}'

Basic Authentication

If API keys aren't suitable for your use case, use Base64-encoded credentials.

Generating Basic Auth Credentials

On macOS/Linux:

echo -n "username:password" | base64

On Windows (PowerShell):

[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("username:password"))

Using Basic Auth

curl -X POST https://lora-api.agiletelecom.com/api/message-server/sms/send \
-H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "+393901234567",
"message": "Hello from Qlara!"
}'

IP Whitelisting

Add an extra layer of security by restricting API access to specific IP addresses. This is optional but recommended for production.

Configuring IP Whitelist

  1. Go to SettingsSecurity
  2. Enable IP Whitelist
  3. Add your server's IP address(es)
  4. Save

Any request from a non-whitelisted IP returns 403 Forbidden.

Error Codes

CodeMeaningAction
401Invalid credentialsCheck API key or Basic Auth credentials
403Unauthorized IPVerify your IP is whitelisted (if enabled)

Security Best Practices

  1. Never expose API keys in client-side code — Use them only on your backend server
  2. Store keys in environment variables — Don't hardcode them
  3. Regenerate if compromised — Go to Settings → API Keys and generate a new one
  4. Use HTTPS only — All requests must be over HTTPS
  5. Rotate credentials periodically — Regenerate keys every 90 days in high-security environments
  6. Log access — Monitor your API key usage in the dashboard

Example: Environment Variables

Python:

import os
api_key = os.getenv('QLARA_API_KEY')

Node.js:

const apiKey = process.env.QLARA_API_KEY;

Bash:

curl -X POST https://lora-api.agiletelecom.com/api/message-server/sms/send \
-H "X-Api-Key: $QLARA_API_KEY" \
-d '...'

Need help with authentication? Contact support at support@agiletelecom.com.