curl - Sending Push via Postman using Firebase Messaging -


i'm trying use postman send single push notification using firebase cloud messaging service.

this working curl command same purposal, on i'm using reference.

curl -x post --header "authorization: key=<api_access_key>" --header "content-type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\":\"<your_device_id_token>\",\"notification\":{\"body\":\"firebase\"} \"priority":\"10"}" 

what have done far..

1 - set headers appropriately

enter image description here

2- @ body , i'm using raw

{     "to" : "<your_device_id_token>"     ,       "notification": {     "body": "firebase cloud message"   }    } 

when executing, i'm getting 401 - unauthorized.

what's missing correctly send push notification?

the correct way set authorization key @ header is

key=<api_access_key>

and not only

<api_access_key>

silly mistake, since useful testing firebase messaging postman i'm leaving question opened.


Comments