Android Python-Firebase云消息传递

Android Python-Firebase云消息传递,android,python,firebase,firebase-cloud-messaging,Android,Python,Firebase,Firebase Cloud Messaging,我想从python向订阅特定主题的所有android用户发送通知 这就是我得到的错误: firebase_admin.messaging.ApiCallError: Firebase Cloud Messaging API has not been used in project 432453324 before or it is disabled. Enable it by visiting https://console.developers.goo gle.com/apis/api/fcm

我想从python向订阅特定主题的所有android用户发送通知

这就是我得到的错误:

firebase_admin.messaging.ApiCallError: Firebase Cloud Messaging API has not been used in project 432453324 before or it is disabled. Enable it by visiting https://console.developers.goo
gle.com/apis/api/fcm.googleapis.com/overview?project=432453324 then retry. 
我为我的android应用程序启用了fcm,当我从控制台向android发送通知时,它可以正常工作,但是python出现了问题,这是什么

这是我的密码:

topic = 'new'

# See documentation on defining a message payload.
message = messaging.Message(
    data={
        'title': 'hahaha',
        'body': 'test',
    },
    topic=topic,
)

# Send a message to the devices subscribed to the provided topic.
response = messaging.send(message)
# Response is a message ID string.
print('Successfully sent message:', response)

您使用的服务器密钥是否与用于从控制台发送该密钥的项目相同?我建议您再次检查一下,我现在将检查,但如果有任何确认,在这个python脚本中,它会成功地将数据写入FireStore,带有消息id的响应就是确认。您这里的代码似乎没有问题,问题可能出在您的
FirebaseMessagingService
上。可能是因为FCM平台坏了,我有一个应用程序在任何一天都应该收到5个不同的通知,而我只收到2个(如果有的话)。消息服务不如Firebase的其他服务好:-(您使用的服务器密钥是否与用于从控制台发送该密钥的项目相同?我建议您再次检查一下我现在将检查,但如果有任何确认,在这个python脚本中,它会成功地将数据写入FireStore,带有消息id的响应是一个确认。您的代码看起来不错,问题可能出在您的计算机上。)
FirebaseMessagingService
。可能是因为FCM平台坏了,我有一个应用程序在任何一天都应该收到5个不同的通知,而我只收到2个(如果有的话)。消息服务不如Firebase的其他服务好:-(