GCM的唯一更改- > FCM迁移文档 需要更改端点:
更新服务器代码以使用新的FCM端点通过HTTP和XMPP发送消息... 可选 ,您可能需要评估FCM HTTP v1 API,该API提供了改进的安全模型和新功能,可跨
Update your server code to use new FCM endpoints for sending messages via HTTP and XMPP... Optionally, you may want to evaluate the FCM HTTP v1 API, which offers an improved security model and new capabilities for customizing messages across
但是视频似乎在讲一个不同的故事:
But the video seems to tell a different story:
我将 需要 更新到可以从firebase控制台获取的新的更安全的服务器密钥...下载服务帐户凭据,然后我将将JSON文件拖到我的项目中...用此服务帐户密钥替换GCM API密钥,我将更新HTTP标头以使用此访问令牌...
I'll need to update to a new more secure server key which I can get from the firebase console... download the service account credentials then I'll drag the JSON file into my project... replace the GCM API key with this service account key I'll update my HTTP header to use this access token...
在向新的FCM端点发送请求时,我们可以继续使用GCM服务器api密钥吗?还是需要从FCM控制台获取更新为更安全的服务器密钥"?
Can we continue to use the GCM server api key when sending requests to the new FCM endpoint or do we "need to update to a more secure server key" obtained from the FCM console?
推荐答案您指出的GCM文档有点旧(不是很多).它显示了从GCM迁移到FCM Legacy 时需要更改的内容. Jen Person在视频中显示的是您要使用 FCM v1 (请参见 8:19 上的uri).
The GCM documentation you pointed out is kinda (not that much) old. It shows what needs to change when migrating from GCM to FCM Legacy. What Jen Person showed in the video is when you are to use FCM v1 (see the uri on 8:19).
在向新的FCM端点发送请求时,我们可以继续使用GCM服务器api密钥吗?还是需要从FCM控制台获取更新为更安全的服务器密钥"?
根据我的评论此处(稍有更新):
From my comment here (with minor updates):
取决于您使用的GCM API密钥类型(如果这是一个古老的项目,您可能仍在使用其他类型的密钥),则可能无法正常工作.无论如何,在将您的GCM项目导入到Firebase之后,它可能会生成必要的API密钥(针对此问题的服务器密钥),您可以(并且应该使用)API密钥才能使FCM正常工作.
Depending on which type of GCM API Key you were using (if this is a reeeaally old project, you might still be using a different type of Key), it may not work. Regardless, after you import your GCM project to Firebase, it would probably generate the necessary API Keys (Server Key for this matter) that you could (and should) use in order for FCM to work.
更多推荐
服务器API密钥:迁移文档与迁移视频
发布评论