使用Firebase云消息传递REST API-“;“地位”:&引用;“未经验证的”;
我正在尝试将firebase REST api与coldfusion一起使用。我的代码如下所示:使用Firebase云消息传递REST API-“;“地位”:&引用;“未经验证的”;,firebase,coldfusion,firebase-cloud-messaging,Firebase,Coldfusion,Firebase Cloud Messaging,我正在尝试将firebase REST api与coldfusion一起使用。我的代码如下所示: <cfhttp method="post" url="https://fcm.googleapis.com/v1/projects/myapp_name/messages:send" result="httpResponse"> <cfhttpparam type="header" name="Content-Type" value=
<cfhttp method="post" url="https://fcm.googleapis.com/v1/projects/myapp_name/messages:send"
result="httpResponse">
<cfhttpparam type="header" name="Content-Type" value="application/json" />
<cfhttpparam type="header" name="Authorization" value="#serverkey#" />
<cfhttpparam type="body" value="#serializeJSON(stFields)#">
</cfhttp>
我得到一个
“错误”:{“code”:401,“消息”:"请求缺少必需的身份验证凭据。需要OAuth 2访问令牌、登录cookie或其他有效的身份验证凭据。
响应。我尝试了firebase控制台上列出的serverkey
的几乎所有密钥。是否发送了错误的头?FCM v1发送不使用服务器密钥。您可以了解有关此请求的更多信息他的.FCM v1发送不使用服务器密钥。您可以了解更多信息。