0
votes

I'm trying to send a push notification via REST API Firebase by Postman for specific user I followed below request pattern:

POST request with below URL :

https://fcm.googleapis.com/fcm/send?key=**my Web API key**

and the Body is

{ "data": { "title": "Firebase notification", "detail": "I am firebase notification. you can customise me. enjoy" }, "to" : "USER UID" }

but the problem is it returns The request was missing an Authentication Key.

1

1 Answers

2
votes

Kindly follow the steps as per bellow :

  • API URL: https://fcm.googleapis.com/fcm/send/

  • Request Method Post

  • Add 2 Key-value pairs in Header section like this

    Content-Type : application/json
    Authorization: key=[Your server key] (Make sure that no space allowed)
    
  • For body choose raw data (JSON)

      { "data": { "title": "Firebase notification", "detail": "I am firebase notification. you can customise me. enjoy" }, "to" : "USER UID" }