firebase-in-app-web-push-notification
Reactive icon

Firebase In-app Web Push Notification

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 25 October 2024
 by 
4.0
 (2 ratings)
firebase-in-app-web-push-notification

Firebase In-app Web Push Notification

Documentation
1.0.0

To setup firebase api:

  1. Create a project in https://console.firebase.google.com/
  2. In General, create web application.
  3. In Cloud Messaging, create web push certificates (will get vapidKey).
  4. In Service accounts, generate private key
  5. On the left menu, choose Build > Authentication, setup any users and sign-in method needed

To setup cloud google api:

  1. Access to the created project on firebase api.
  2. In Credentials, create credential > API Key, after that we will get APIKey
  3. In Credentials, create credential > OAuth Client Id (will get the client Id and secrets)

Try playround:

  1. Access the the playround: https://developers.google.com/oauthplayground
  2. Step 1, key in https://www.googleapis.com/auth/firebase.messaging then Authorize APIs
  3. Step 2, Exchange authorization code for tokens (will get Refresh token and Access token)
  4. Step 3, try to send message

{ "message": { "token": "fIuVH019sy4fSYYXfPkJr8:APA91bG-8fKv3qY9_rOdCVew9s3PHW9gCczicQyg-fByEyPy483oKVIAbzgawSgXXwwZ1ou98PvbhXifpgC3oDZLkj_RqFZvN1Xeqd30FfKa2aPT3TcMgq2PHVPHQ9STfNtNwoLhe8zo", "notification": { "title": "Test title", "body": "Test body" } } } 

To make the api work on the backend, click on the setting icon on the top right of playground