Discussions

Ask a Question
Back to All

405 Status Error Code

Hi so currently I am using the webhook to send to my backend and I am using the event form/submission.created

so here's my code to my backend so this is just for testing purposes.

app.post('/email_sent_webhook', (req, res) => {
  try {
    const { body } = req;
    
    console.log('Email Sent Webhook Received:');
    console.log(JSON.stringify(body, null, 2));

    // Process the webhook data here
    // ...

    res.status(200).json({ message: 'Webhook received successfully' });
  } catch (error) {
    console.error('Error processing webhook:', error);
    res.status(500).json({ error: 'Internal Server Error' });
  }
});

but after checking it has this error


Attempt number
1
Status
Response code
405
Response message
Not Allowed
Response body

405 Not Allowed

405 Not Allowed


nginx/1.20.1