6

Ich versuche, mit Postman Firebase URL zu treffen, aber es gibt mir einen Fehler. Ich habe Setup alle Dinge, aber es ist immer noch es gibt mir FehlerDie Anfrage fehlte ein Authentifizierungsschlüssel FCM Token

Hier ist der Fehler, den ich auf Postbote bin immer

<HTML> 
    <HEAD> 
     <TITLE>The request was missing an Authentification Key (FCM Token). Please, refer to section &quot;Authentification&quot; of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</TITLE> 
    </HEAD> 
    <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> 
     <H1>The request was missing an Authentification Key (FCM Token). Please, refer to section &quot;Authentification&quot; of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</H1> 
     <H2>Error 401</H2> 
    </BODY> 
</HTML> 


These things I am adding <br/> 
url = 'https://fcm.googleapis.com/fcm/send'<br/> 
method = POST<br/> 
Headers <br/> 
Authorization = 'FIREBASE_SERVER_API_KEY'<br/> 
Content-Type = application/json<br/> 
Body = 
"{"registration_ids":["ids"],"priority":"high\",\"data\":{\"notification_id\":76,\"title\":\"dvxcv\",\"description\":\"xcvxv\",\"image\":\"/uploads/image/image/37513/Screenshot_from_2016-10-17_10_43_59.png\"}}" 

Antwort

4

Alles, was Sie zuerst in Header-
Authorization tun müssen: key = 'FIREBASE_SERVER_API_KEY'

Und Sie haben Probleme mit json Sie Parsen haben entfernen '/'

{"registration_ids":["ids"],"priority":"high","data":{"notification_id":76,"title":"dvxcv","description":"xcvxv","image":"/uploads/image/image/37513/Screenshot_from_2016-10-17_10_43_59.png"}} 

bearbeiten Für Verwirrung meines Tutorial how to integrate firebase with ruby on rails

+0

Ich bekomme die gleiche Nachricht in Postman und ich habe die Autorisierung: key = (das ist der FCM-Token zeigt in der Cloud-Messaging-Registerkarte) –

+0

Also, wie hast du gelöst? – ankur

+0

Ich habe immer noch nicht herausgefunden, was falsch ist. –

1

Unter Header Authorization folgen: key = AAAA .....

HAVE "key =" TO ADD vor dem Firebase Server Schlüssel-Token !! !

+0

Das hat funktioniert. Gut gemacht. – kamyFC

Verwandte Themen