https://notifyr.vercel.app/api/v1/generate-client-secret
Generates a client secret for the NotificationMenu
component.
export default async function handler(req, res) {
// Add validation
try {
const response = await fetch(`https://notifyr.vercel.app/api/v1/generate-client-secret`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.NOTIFYR_API_KEY}`,
},
body: JSON.stringify({
groupId: 'test_user@gmail.com',
}),
});
const result = await response.json();
res.status(200).json(result);
} catch (e) {
return res.status(500).json({ error: e });
}
}
parameter | type | description |
---|---|---|
groupId | Required string | The group you want to send the notification to. |