I am trying to send messages through Google's Firebase using cfhttp and keep getting 401 error. I have tried using the correct headers but still get 401 errors like
The request's Authentication (Server-) Key contained an invalid or malformed FCM-Token (a.k.a. IID-Token).
Here is the code:
<cfhttp method="Post" url="https://fcm.googleapis.com/fcm/send">
<cfhttpparam type="header" name="Authorization: key=" value="AIzaSE">
<cfhttpparam type="header" name="Content-Type" value="application/json">
<cfhttpparam type="header" name="Postman-Token" value="e19b75b5df7bf3f9">
<cfhttpparam type="header" name="cache-control" value="no-cache">
<cfhttpparam type="Formfield" value="e5kpn86a0fC6rt9Xi50bCURG0BS4S6ccUm3X5q" name="to">
<cfhttpparam type="Formfield" value="high" name="priority">
<cfhttpparam type="Formfield" value="" name="title">
<cfhttpparam type="Formfield" value="This is the actual message content" name="body">
<cfhttpparam type="Formfield" value="https://gladevalleyanimalhospital.net/wp-content/uploads/2017/03/raster-7.png" name="image">
</cfhttp>