import firebase_admin from firebase_admin import credentials from firebase_admin import auth from firebase_admin import db # Initialize Firebase Admin SDK cred = credentials.Certificate('servicekey.json') try: firebase_admin.initialize_app(cred, {'databaseURL': 'https://farmbase-b2f7e-31c0c.firebaseio.com/'}) except: print('fire running') # Define the UID you want to retrieve information for uid = "your_uid_here" uid_obj = db.reference('SalesAssociatesPromo').child('AdminUIDs').get() for (uid, temp) in uid_obj.items(): try: # Retrieve the user data by UID user = auth.get_user(uid) # Check if the user has an email address if user.email: print(f"Email: {user.email}") # Check if the user has a phone number if user.phone_number: print(f"Phone Number: {user.phone_number}") except auth.UserNotFoundError: print("User not found.") # Don't forget to catch other exceptions that may occur during Firebase operations.