SMS API
Authentication
Securely authenticate requests to the Safravo SMS API.
The SMS API uses the credentials issued for your messaging account. Include them in the JSON request body for each operation that sends a message or checks a balance.
Credential fields
| Field | Description |
|---|---|
apikey | Your messaging account API key |
partnerID | Your messaging account partner identifier |
shortcode | Your approved sender ID for outgoing messages |
Security requirements
- Store credentials in server-side environment variables or a secrets manager.
- Never commit credentials to source control.
- Never include credentials in client-side JavaScript, mobile apps, or public URLs.
- Rotate credentials immediately if they are exposed.
- Use a separate credential set for development and production.
Safravo does not issue or store your messaging provider credentials for public sending. Your request is authenticated using the credentials supplied for your messaging account.
Example server configuration
SAFRAVO_SMS_API_KEY=your-api-key
SAFRAVO_SMS_PARTNER_ID=your-partner-id
SAFRAVO_SMS_SENDER_ID=YOUR-SENDER-IDUse these values from your backend when building requests to https://api.safravo.co.ke.