Authentication
The Sendme API uses API Key-based authentication to protect all endpoints.
Supported Authentication Types
Section titled “Supported Authentication Types”1. API Key (Recommended)
Section titled “1. API Key (Recommended)”Include your API key in the api-key
header of each request.
GET /api/contactsHost: app.sendme123.comapi-key: your-api-key-hereContent-Type: application/json
2. JWT Bearer Token
Section titled “2. JWT Bearer Token”You can also use a JWT Bearer token in the authorization header.
GET /api/contactsHost: app.sendme123.comAuthorization: Bearer your-jwt-token-hereContent-Type: application/json
Getting Your API Key
Section titled “Getting Your API Key”To obtain your API Key:
- Sign up at https://app.sendme123.com
- Create your account and verify your email
- Access the admin panel
- Go to the “Settings” or “API Keys” section
- Generate your personal API Key
Authentication Response Codes
Section titled “Authentication Response Codes”Code | Description |
---|---|
401 | Missing or invalid API Key |
403 | Valid API Key but insufficient permissions |
429 | Request limit exceeded |
Usage Examples
Section titled “Usage Examples”curl -X GET "https://app.sendme123.com/api/contacts" \ -H "api-key: your-api-key-here" \ -H "Content-Type: application/json"
const getContacts = async () => { try { const response = await axios.get('https://app.sendme123.com/api/contacts', { headers: { 'api-key': 'your-api-key-here', 'Content-Type': 'application/json' } });
console.log('Contacts retrieved:', response.data); return response.data; } catch (error) { console.error('Authentication error:', error.response?.data || error.message); throw error; }};
import requests
headers = { 'api-key': 'your-api-key-here', 'Content-Type': 'application/json'}
response = requests.get('https://app.sendme123.com/api/contacts', headers=headers)data = response.json()