def send_moni_noti(uid, field_name, user_name): import requests import json #firebase_admin.initialize_app(cred, {'databaseURL': 'https://farmbase-b2f7e-31c0c.firebaseio.com/'}) # Initialize the app with a service account, granting admin privileges req_obj = { "UID": uid, "notification_body": "Hi " + user_name + ", the latest satellite data for your field named " + field_name + " is now available. Check it out in the \"My Fields\" section of the app!", "notification_title": "New Satellite Data Ready for Your Field!" } headers = {'Content-type': 'application/json'} url = 'https://us-central1-farmbase-b2f7e.cloudfunctions.net/send_fcm_notification' response = requests.post(url, data=json.dumps(req_obj), headers=headers)