The error 401 Client Error suggests that the service account you're using might not have sufficient permissions to send notifications. check permission for Firebase Cloud Messaging Admin and Firebase Admin SDK Administrator Service Agent