Bank account details: Name of the account: Nanda Gokulam Goshala Trust Current A/c Number: 751905001069 ICICI BANK IFSC: ICIC0007519 80G TAX EXEMPTION IS AVAILBALE
Phonepe: 7207039706
UPI ID: eazypay.6TBEZLN3PV624A6@icici
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.0.0/firebase-app.js";
import { getMessaging, getToken } from "https://www.gstatic.com/firebasejs/9.0.0/firebase-messaging.js";
const firebaseConfig = {
apiKey: "AIzaSyBYI7Tqi4z32wLsJt4g3DWbhw80Xa0wJmc",
authDomain: "kurmagram-notifications.firebaseapp.com",
projectId: "kurmagram-notifications",
storageBucket: "kurmagram-notifications.firebasestorage.app",
messagingSenderId: "655848703795",
appId: "1:655848703795:web:5b07d653a539195a256046",
measurementId: "G-83KRS6L72B"
};
console.log("1. Firebase initialized...");
const app = initializeApp(firebaseConfig);
const messaging = getMessaging(app);
// This function forces the browser to ask for permission
async function initNotifications() {
try {
console.log("2. Requesting permission...");
const permission = await Notification.requestPermission();
if (permission === 'granted') {
console.log("3. Permission granted! Getting token...");
const token = await getToken(messaging, {
vapidKey: 'BNONhdDluBUWw4hMyiP6jPdgNaIcvMMc--mMSfOPcYzxW2nfp-YSPoKZZd49F9HaAAR8ZoVa3wdSL7oZhA15kWY'
});
if (token) {
console.log("4. Success! Your Token is:", token);
// You can copy this token from the console to send a test message
} else {
console.log("Error: No registration token available.");
}
} else {
console.log("Permission was denied by the user.");
}
} catch (err) {
console.log("An error occurred while retrieving token: ", err);
}
}
// Run the function as soon as the page loads
initNotifications();