使用Firebase Cloud Messaging发送MulticastMessage时出现404错误求助
Firebase Cloud Messaging发送MulticastMessage时出现404错误求助
各位开发者好,我最近在使用Firebase Cloud Messaging发送批量通知时遇到了一个棘手的问题,想求助大家帮忙排查下原因。
我运行了以下批量发送通知的代码:
cred = credentials.Certificate('x.json') firebase_admin.initialize_app(cred) registration_tokens = [ 'GET REAL TOKEN1', 'GET REAL TOKEN2', ] message = messaging.MulticastMessage( notification=messaging.Notification( title="Notification Title", body="Notification Text", ), tokens=registration_tokens ) response = messaging.send_multicast(message) print('response', response.success_count, response.failure_count)
但执行这段代码后,我收到了404错误,具体错误内容如下:
<a href=//www.google.com/></a> <p><b>404.</b> <ins>That’s an error.</ins> <p>The requested URL <code>/batch</code> was not found on this server. <ins>That’s all we know.</ins>
特别说明:我使用messaging.Message()单独给单个用户发送消息时完全正常,没有任何问题,只有批量发送时会触发这个404错误。
备注:内容来源于stack exchange,提问作者Alireza.e
相关产品推荐
相关产品推荐

