Skip to content

Error with V0.0.6 and ruby 2.1.0 #136

@tejas-flywheel

Description

@tejas-flywheel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions