任何人都可以告诉我如何使用FCM向一组组ID发送推送通知。
我尝试了
url =“ https://fcm.googleapis.com/fcm/send”
headers = {
"Content-Type":"application/json",
"Authorization":"key={}".format(API_KEY)
}
body = {
"registration_ids":["group_id1","group_id2",...."group_idn"],
"data": {
"hello": "This is a Firebase Cloud Messaging Device Group Message!",
}
}
但这给了我错误。
{“ multicast_id”:6704816187425274139,“成功”:0,“失败”:1,“ canonical_ids”:0,“结果”:[{“错误”:“未注册”}]}}