You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import * as admin from 'firebase-admin';
admin.initializeApp({
credential: admin.credential.cert({
projectId: ''',
clientEmail: ''',
privateKey:'''
}),
databaseURL: '',
});
export const sendNotificationAll = async (
messageTitle?: string,
messageBody?: string,
topic?: string,
type?: string,
) => {
const message = {
notification: {
title: messageTitle,
body: messageBody,
},
topic: 'test',
};
const response = await admin
.messaging()
.send(message)
.then((response) => {
// Response is a message ID string.
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});
};
notification coming for localhost or local IP through node API but not working for Production using HTTPS .
The text was updated successfully, but these errors were encountered:
import * as admin from 'firebase-admin';
admin.initializeApp({
credential: admin.credential.cert({
projectId: ''',
clientEmail: ''',
privateKey:'''
}),
databaseURL: '',
});
export const sendNotificationAll = async (
messageTitle?: string,
messageBody?: string,
topic?: string,
type?: string,
) => {
const message = {
notification: {
title: messageTitle,
body: messageBody,
},
topic: 'test',
};
const response = await admin
.messaging()
.send(message)
.then((response) => {
// Response is a message ID string.
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});
};
notification coming for localhost or local IP through node API but not working for Production using HTTPS .
The text was updated successfully, but these errors were encountered: