Push Notification Api

FREEMIUM
By TeamsDevBot | Updated vor einem Monat | Advertising
Popularity

0 / 10

Latency

1,590ms

Service Level

100%

Health Check

N/A

README


> ~~## How to setup frontend web app too which your visitors will subscribe?
~~


- [ ] **Steps**

1. Add SW.js file to your public folder.
2. Add these code in header app.
`<script>
        navigator.serviceWorker.register("sw.js");

        function enableNotif() {
            Notification.requestPermission().then((permission)=> {
                if (permission === 'granted') {
                    // get service worker
                    navigator.serviceWorker.ready.then((sw)=> {
                        // subscribe
                        sw.pushManager.subscribe({
                            userVisibleOnly: true,
                            applicationServerKey: "these code will generate for you"
                        }).then((subscription)=> {
                            console.log(JSON.stringify(subscription));
                         
                        });
                    });
                }
            });
        }
    </script>`







Followers: 0
API Creator:
Rapid account: Teams Dev Bot
TeamsDevBot
teamsdevbot
Log In to Rate API
Rating: 5 - Votes: 1