It is no longer possible to use a server key to send messages through Firebase Cloud Messaging.
You will nowadays needs to use Google Application Default Credentials, a service account JSON file, or a short-lived OAuth2 access token derived from a service account to authorize requests. See the Firebase documentation for full details on how to do this: https://firebase.google.com/docs/cloud-messaging/auth-server
Also see these topics in the Firebase FAQ: