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)
Code: Select all
[url=//www.google.com/][/url]
404.[/b] That’s an error.
The requested URL /batchHINWEIS: Ich kann eine Nachricht an einen Benutzer senden und korrekt arbeiten:
Code: Select all
messaging.Message()
Mobile version