Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Created October 25, 2020 20:45
Show Gist options
  • Save hiranya911/43a0990d4a0e97b0870a3794cdb0f2c9 to your computer and use it in GitHub Desktop.
Save hiranya911/43a0990d4a0e97b0870a3794cdb0f2c9 to your computer and use it in GitHub Desktop.
import firebase_admin
from firebase_admin import messaging
def enable_http_client_logging():
import http.client as http_client
http_client.HTTPConnection.debuglevel = 1
if __name__ == '__main__':
enable_http_client_logging()
firebase_admin.initialize_app()
msg = messaging.Message(
notification=messaging.Notification(title='Hello world!'),
topic='test',
)
msg_id = messaging.send(msg)
print(msg_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment