❓ FAQ - Private Server
📱 Why can't the Android app connect to my private server?
If the Android app cannot find or connect to your private server, check the following:
1. API URL Format
The API URL must include the full path /api/mobile/v1. Using just the base URL will not work.
Common Mistake
The cloud server uses URL rewriting where api.sms-gate.app already contains the api part. With a private server, you must include /api in the path.
2. HTTPS Requirement
The Android app requires HTTPS for all communications with your private server unless you use an insecure build variant. Using HTTP will result in connection failures.
SSL Certificate Options
- Use Let's Encrypt for a free, trusted certificate
- Use our project CA for private IP addresses
- Use a tunneling service like ngrok or Cloudflare Tunnel for testing
3. Network Connectivity
Ensure your server is accessible from the device's network:
- Check firewall rules allow incoming connections on your server port
- Verify DNS resolution if using a domain name
- Test connectivity with
curl https://your-server.com/healthfrom the device network
📊 How do I verify my private server is working?
Test your server with a health check:
A successful response returns JSON with server status information.
SSL Verification
If using a self-signed certificate, you may need to use curl -k or curl --insecure for testing, but the Android app requires a valid certificate.
📫 How do I send messages from external applications?
To send messages or interact with your private server from external applications, you must use the /api/3rdparty/v1 endpoint.
Sending Messages via API
URL Path Difference
The cloud server uses https://api.sms-gate.app/3rdparty/v1/messages because the domain already contains api. With a private server, you need /api/3rdparty/v1/....