My project in FCM has no server key shown in cloud messaging .. only sender ID as shown .. and I am trying to send notification from post man .. so I must have the server key I tried to get the key from the google-services.json file api_key .. current key but it's not working. the code sent in postman is : header: Authorization key="AIzaSyBENvif3XkufbKkjRRE92ECj7RBA0LlWj0" body: "to":"c_OHgeJnQmi_F3i3D7wivZ:APA91bHnvHMI_mR9IWoesWeBOLE1aEXGa-1v-1UVCtt1MriXRo03VcaxxTiBAztnbUOrXCf_AVAqAgyOGBcvK4IsO0cW1o1UNXJQqVpkLKveH0aAPkd7kHvBhUGcGkY--IfBctUvgrR7", "notification" : { "body" : "New announcement assigned", "OrganizationId":"2", "content_available" : true, "priority" : "high", "subtitle":"Elementary School", "Title":"hello" }, "data" : { "priority" : "high", "sound":"app_sound.wav", "content_available" : true, "bodyText" : "New Announcement assigned", "organization" :"Elementary school" can any one help please ?
Foirebase no server key found
452 views Asked by Mohamed Awad At
2
There are 2 answers
0
On
Firebase Generate Server-Key 2023
I ran with this issue so this is what i've done
- The server key for testing the Cloud messaging is disabled by default
- First navigate to the menu of firebase and click Project Settings -> Cloud messaging tab enter image description here
- You will find Cloud messaging API disabled enter image description here
- click on the dots -> manage API in Google enter image description here
- Click on enable 4
- Return and refresh the page, you should now be able to copy & test with your server key.
I found the solution ... FCM has two ways to send notification 1 - Firebase Cloud Messaging API (V1) 2 - Cloud Messaging API (Legacy) The server key is available on the second way which is disabled by default and must be enabled to get the server key and send notification via API using post man