FCM Receiver is a Go application that can receive FCM (Firebase Cloud Messaging) notifications and forward them as a webhook.
- Receives FCM notifications from Android devices
- Stores Android device details (FCM token, Android ID, etc.) to a JSON file
- Forwards the FCM notification data to a specified webhook URL
- Provides two HTTP endpoints:
/token
and/device
/device
returns the stored device details
- Go version 1.16 or newer
- Git
-
Clone the repository:
git clone https://github.com/agusibrahim/fcmreceiver
-
Navigate to the project directory:
cd fcmreceiver
-
Build the application:
make build
The command above will generate a binary for the current operating system. If you want to build for a different platform, you can run the following command:
GOOS=linux GOARCH=amd64 make build
This will generate a binary for the Linux operating system with the amd64 architecture.
-
Run the application by passing the webhook URL as an argument:
./fcmreceiver --webhook https://example.com/webhook --deviceid 12345678900
-
The application will start listening for FCM notifications and forward them to the specified webhook URL.
-
You can access the following HTTP endpoints:
/device
: Returns the stored device details
If you find any bugs or have ideas for further development, feel free to open an issue or create a pull request.
This project is licensed under the MIT License.
The explanation is similar to the previous Indonesian version:
- The "Features" section describes the main features of the FCM Receiver application.
- The "How to Use" section provides instructions for building and running the application.
- The "Contributing" section invites users to report bugs or suggest improvements.
- The "License" section states the project's license.
Make sure to update the information, links, and other details according to your project.