gpt4 book ai didi

android - 用于测试 GCM 或 FCM 的服务器端点是什么?

转载 作者:行者123 更新时间:2023-11-29 18:36:15 24 4
gpt4 key购买 nike

网址 https://fcm.googleapis.com/fcm/send用于生产,我想知道测试环境的端点,因为我希望测试和生产指向不同的远程系统。测试的 URL 是什么?

在此页上 https://firebase.google.com/docs/cloud-messaging/http-server-ref

没有提及任何用于测试环境的 URL。

最佳答案

您可以使用 postman REST api 通过发送到 url 来发送推送通知:

https://fcm.googleapis.com/fcm/send
Method: POST

不要忘记在标题中添加:

Authorization:key=yourServerKeyFromFirebaseTestEnvironment
Content-Type:application/json

而当你需要发送到你的测试环境时,你需要创建一个firebase测试环境并使用它的服务器 key

关于android - 用于测试 GCM 或 FCM 的服务器端点是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54214080/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com