<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>
我得到一个
"error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential.
回应。我试过firebase控制台上列出的每一个键
serverkey
. 我发错标题了吗?