-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
It was working few months back but now I see below error
#FCM:0x00000002c134d0, response: {:body=>"\n\n<TITLE>Not Found</TITLE>\n\n<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">\n\n
Not Found
\nError 404
\n\n\n", :headers=>{"cache-control"=>["no-cache, no-store, max-age=0, must-revalidate"], "pragma"=>["no-cache"], "expires"=>["Mon, 01 Jan 1990 00:00:00 GMT"], "date"=>["Wed, 19 Feb 2025 07:58:00 GMT"], "content-type"=>["text/html; charset=UTF-8"], "x-content-type-options"=>["nosniff"], "x-frame-options"=>["SAMEORIGIN"], "content-security-policy"=>["frame-ancestors 'self'"], "x-xss-protection"=>["1; mode=block"], "server"=>["GSE"], "alt-svc"=>["h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"], "connection"=>["close"], "transfer-encoding"=>["chunked"]}, :status_code=>404}"}require 'fcm'
# Initialize the FCM client with the legacy server key
fcm = FCM.new("XXXXX")
# Define the notification payload
options = {
notification: {
title: "1.Your Notification Title",
body: "2.Your notification message",
sound: "default"
}
}
device_token = "Firebase_device_token"
# Send the notification
response = fcm.send([device_token], options)
# Output the response from FCM
puts response
Metadata
Metadata
Assignees
Labels
No labels