Created
October 25, 2020 20:45
-
-
Save hiranya911/43a0990d4a0e97b0870a3794cdb0f2c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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