A React Native Android app that forwards incoming SMS messages to REST APIs or Telegram bots.
- Home Page: Start/stop SMS forwarding service with real-time status
- Configuration Page: Set up REST API and Telegram bot forwarding
- REST API Forwarding: Send SMS data to any REST endpoint
- Telegram Bot Integration: Forward SMS to Telegram chats
- Real-time Status: Track service status and SMS count
- Test Functions: Test your API and Telegram configurations
The app includes:
- Clean, modern UI with status indicators
- Easy-to-use configuration forms
- Real-time service status monitoring
- Test buttons for API and Telegram validation
- Clone the repository:
git clone <repository-url>
cd sms-forwarder- Install dependencies:
npm install- Start the development server:
npm start- Run on Android:
npm run android- Go to Configuration page
- Enable REST API toggle
- Enter your API URL (e.g.,
https://your-api.com/sms) - Select HTTP method (GET, POST, PUT, PATCH)
- Configure headers in JSON format:
{
"Content-Type": "application/json",
"Authorization": "Bearer your-token"
}- Test the configuration using the "Test REST API" button
- Create a Telegram bot using @BotFather
- Get your bot token
- Get your chat ID (you can use @userinfobot)
- Enable Telegram toggle in Configuration
- Enter bot token and chat ID
- Test using the "Test Telegram" button
When SMS is forwarded, the following data structure is sent:
{
"message": "SMS content",
"sender": "+1234567890",
"timestamp": "1640995200000",
"dateSent": "1640995200000",
"receivedAt": "2024-01-01T12:00:00.000Z"
}📱 *New SMS Received*
📞 *From:* +1234567890
📅 *Date:* 1/1/2024, 12:00:00 PM
💬 *Message:*
SMS content here
The app requires the following Android permissions:
RECEIVE_SMS: To receive incoming SMSREAD_SMS: To read SMS contentINTERNET: To send data to APIsACCESS_NETWORK_STATE: To check network connectivityWAKE_LOCK: To keep service runningFOREGROUND_SERVICE: To run background service
The app currently uses a mock SMS listener for development/testing. To implement real SMS listening:
- Install a proper SMS listener library:
npm install react-native-sms-listener- Uncomment the real implementation in
hooks/useSMSListener.ts - Comment out the mock implementation
The mock SMS listener generates test SMS every 30 seconds when the service is running. This allows you to test the forwarding functionality without receiving actual SMS.
- Check that you have granted SMS permissions
- Verify your configuration is saved
- Check the console for error messages
- Test your API endpoint using the test button
- Verify your headers format (must be valid JSON)
- Check network connectivity
- Verify bot token is correct
- Ensure chat ID is valid
- Test using the test button
- Check that the bot is not blocked
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Check the troubleshooting section
- Review the console logs
- Create an issue on GitHub
- Provide detailed error information and steps to reproduce