我们可以使用 FCM API KEY FOR GCM

Can we use FCM API KEY FOR GCM

我是 GCM/FCM 的新手。我的团队为 FCM 创建了 API 密钥,但由于一些内部问题,我们无法使用 FCM。我可以知道我是否可以对 GCM 使用相同的 API 密钥。

提前致谢。

是的。为 FCM 生成的服务器密钥可用于旧的 GCM 项目。

但是请注意,目前生成服务器密钥的唯一方法是在 Firebase 控制台中创建一个 Firebase 项目。来自 GCM docs:

Starting from September 2016, you can create new server keys only in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.