Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with V0.0.6 and ruby 2.1.0 #136

Open
tejas-flywheel opened this issue Feb 19, 2025 · 0 comments
Open

Error with V0.0.6 and ruby 2.1.0 #136

tejas-flywheel opened this issue Feb 19, 2025 · 0 comments

Comments

@tejas-flywheel
Copy link

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

\n

Error 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant