Generate Client Secret

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 });
	}
}
parametertypedescription
groupIdRequired
string
The group you want to send the notification to.