FCM sendet Multicast-NachrichtPython

Python-Programme
Anonymous
 FCM sendet Multicast-Nachricht

Post by Anonymous »

Ich führe diesen Code aus:

Code: Select all

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)
Beim Ausführen dieses Codes wird die Fehlermeldung angezeigt:

Code: Select all

[url=//www.google.com/][/url]
404.[/b] That’s an error.
The requested URL /batch
was not found on this server. That’s all we know.

HINWEIS: Ich kann eine Nachricht an einen Benutzer senden und korrekt arbeiten:

Code: Select all

messaging.Message()

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post