Giter Site home page Giter Site logo

jaeho214 / spring-boot-fcm-push-notifications Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imaginalis/spring-boot-fcm-push-notifications

0.0 0.0 0.0 134 KB

Simple Spring Boot app with Firebase Cloud Messaging push notifications integration

Java 100.00%

spring-boot-fcm-push-notifications's Introduction

Spring Boot + FCM - simple push notifications server-side application

alt text

This is simple Spring Boot application with Firebase Cloud Messaging integration.

Technologies

  • Spring Boot
  • Firebase Cloud Messaging

Configuration

  • Provide your own Firebase Admin SDK, JSON-formatted file (service account credentials) and place it inside the project (for example src/resources/google)
  • Change the path and defaults in application.properties

Endpoints

  • GET /notification – Trigger sample notification with default values sending

curl -H "Content-Type: application/json" -X GET http://localhost:8080/notification

  • POST /notification/topic – Send a message to a specific topic

curl -d '{"title":"Hello", "message":"The message...", "topic":"contactTopic"}' -H "Content-Type: application/json" -X POST http://localhost:8080/notification/topic

  • POST /notification/token – Send a message to a specific device (with token)

curl -d '{"title":"Hey you!", "message":"Watch out!", "token":"cct00ebz8eg:APA91bFcTkFE_0Qafj6nWv5yHxqCLTyxAaqi4QzwsFNLP5M9G78X8Z5UMZTW004q1PUux63Ut-1WMGVToMNTdB3ZfO8lCZlc4lGpxm7LBdWfkhaUxdbpQ5xIO5cAb-w9H2dBLNHT7i-U", "topic": ""}' -H "Content-Type: application/json" -X POST http://localhost:8080/notification/token

  • POST /notification/data – Send a message to a specific topic with additional payload data.

curl -d '{"title":"Hello", "message":"Data message", "topic":"contactTopic"}' -H "Content-Type: application/json" -X POST http://localhost:8080/notification/data

  • Success response

{ "status": 200, "message": "Notification has been sent." }

More information

spring-boot-fcm-push-notifications's People

Contributors

imaginalis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.