Authentication
Mobile App Integration Guide
The API uses Bearer token authentication. There are two types of API key: a User API Key (no Android device needed) and a Per-Device Token (tied to a registered Android phone).
Token Types
Choose the token type that matches your free SMS marketing integration:
User API Key - for direct API access (no phone needed)
The simplest way to integrate. Generate a personal API key from the web panel Settings page and use it to queue SMS, WhatsApp messages, and campaigns via any HTTP client. No Android device or SIM card is required when messages are sent via connected SMS providers or credits.
- Log in to the web panel and go to Settings.
- Scroll to the API Key section and click Generate Key.
- Copy the key and use it in the
Authorization: Bearerheader of your requests.
Per-Device Token - for the Android app
Each Android phone registered in the Devices section gets its own token. This token is used by the Android app to poll the message queue, report delivery status, and sync the inbox. It is tied to a specific device and SIM card.
- Go to Devices > Add Device in the web panel.
- Scan the QR code with the Android app. The app calls
claim_deviceand the token is stored automatically. - The app uses
Authorization: Bearer {token}for all subsequent requests.
Sending the Token
Authorization header (preferred)
Authorization: Bearer YOUR-API-KEY
X-API-Token header
X-API-Token: YOUR-API-KEY
?token= query parameter (fallback, useful when headers are stripped by proxies)
https://api.rcszilla.com/?endpoint=queue_sms&token=YOUR-API-KEY
Legacy Token
Older builds used a single shared mobile_app_token per user stored in settings. This still works for backward compatibility, but the User API Key or per-device tokens are strongly preferred.
Device Token Lifecycle
- Admin opens Devices > Add Device in the web panel and a one-time registration token (QR code) is generated.
- App scans the QR and calls
claim_devicewith that token. - Server creates the device row. The same token is now the permanent per-device API token.
- App stores the token securely (Android
EncryptedSharedPreferencesrecommended). - All subsequent requests use
Authorization: Bearer {token}. - Admin can regenerate the token at any time from the Devices page. The old token is immediately invalidated.