-3

I am using FCM API for send push notification on android and ios

I need to pass header parameters in post method.Is it possible?

I got below error:

Didn't run because: Unexpected HTTP response code: 401 (Unauthorized) Response body: The request was missing an Authentication Key (FCM Token). Please, refer to section "Authentication" of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.

The request was missing an Authentication Key (FCM Token). Please, refer to section "Authentication" of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.

Error 401

below is screen shot;

enter image description here

Vishal Vaishnav
  • 3,346
  • 3
  • 26
  • 57

1 Answers1

0

I guess Firebase has upgraded its server keys to a new version. Why don't you try "Legacy Server Key" for authorisation instead of server key.

https://i.stack.imgur.com/8MbPH.png

Anil Kumar
  • 11
  • 1