我試圖使用郵遞員來測試FCM,但即使FCM令牌存在,我也總是得到以下錯誤。我在雲消息傳遞標籤中獲得了令牌:Firebase雲消息傳遞令牌。FCM令牌丟失
<HTML>
<HEAD>
<TITLE>The request was missing an Authentification Key (FCM Token). Please, refer to section "Authentification" of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</TITLE>
</HEAD>
這是我發送的。
POST /fcm/send HTTP/1.1
Host: fcm.googleapis.com
Cache-Control: no-cache
Postman-Token: 9109eb13-245f-0786-21a5-6207f5426b44
Content-Type:application/json
Authorization:key=AAAAfnYrKvU:APA91bFwgeM3zuFId6UDzvIHk9qZ3lKHnX-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{ "data": { "message": "This is a Firebase Cloud Messaging Topic Message!", } }:
正要在評論較早添加,但時間流逝了。你做的步驟是一樣的,因爲我這個[文件]中提供的樣品(http://stackoverflow.com/documentation/google-cloud-messaging/5811/getting-started-with-google-cloud-messaging/20474/send -downstream的消息 - 從最雲#噸= 201611290600158576573)。做得好。 –
也可以通過在「提供了一個[實例id](http://stackoverflow.com/questions/37671380/what-is-fcm-token-in-firebase/37671576#37671576)(令牌)發送到各個設備「字段。 –
是的,答案是正確的。我沒有注意到在我的情況下是標記本身之前的「key =」。 – brunoramonalmeida