Use this endpoint to verify that your webhook endpoint is correctly configured and can receive and validate webhook payloads. The test sends a ping event to your endpoint.
The webhook must be subscribed to the ping event for testing to work.
{ "success": true, "data": { "success": false, "message": "Webhook is not subscribed to ping events. Add the ping event to the webhook configuration." }}
{ "success": true, "data": { "success": false, "message": "No delivery was created. This may indicate the webhook is disabled or circuit breaker is open." }}
Use the test to verify your signature validation is working correctly:
Copy
// Configure Express to preserve raw body for signature verificationapp.post('/webhooks/instaview', express.raw({ type: 'application/json' }), (req, res) => { const signature = req.headers['x-webhook-signature']; const payload = req.body.toString(); // Now this is the raw buffer if (!verifySignature(payload, signature, process.env.WEBHOOK_SECRET)) { console.error('Signature verification failed'); return res.status(401).send('Invalid signature'); } const event = JSON.parse(payload); if (event.event === 'ping') { console.log('Ping test received successfully'); console.log('Message:', event.data.message); } res.status(200).send('OK'); });