APIs & Integrations

javid999
Member

Contact change or creation does not call webhook (Responds 403)

SOLVE

Hello community,

 I did the following steps with exact order according to webhook docs:


1) Created contact scopes in scopes section

  • crm.objects.contacts.write
  • crm.objects.contacts.read
  • crm.schemas.contacts.read
  • crm.schemas.contacts.write

2) Configured webhook to call our internal endpoint. Currently we do not validate the request by headers so it's publicly available.

3) Created contact

Note : After getting 403 for our internal endpoint, we configured webhooks to https://webhook.site/ assuming our server refuses the request somehow. But both gets 403. 


We checked the incoming requests in our server logs and we do not even get webhooks. We use Azure Appservices and certificate from  DigiCert Global Root G2 



Response Payload : 

javid999_0-1711716063277.png

0 Upvotes
1 Accepted solution
HMir
Solution
Member

Contact change or creation does not call webhook (Responds 403)

SOLVE

@javid999 wrote:

Hello community,

 I did the following steps with exact order according to webhook docs:


1) Created contact scopes in scopes section

  • crm.objects.contacts.write
  • crm.objects.contacts.read
  • crm.schemas.contacts.read
  • crm.schemas.contacts.write

2) Configured webhook to call our internal endpoint. Currently we do not validate the request by headers so it's publicly available.

3) Created contact

Note : After getting 403 for our internal endpoint, we configured webhooks to https://webhook.site/ assuming our server refuses the request somehow. But both gets 403. 


We checked the incoming requests in our server logs and we do not even get webhooks. We use Azure Appservices and certificate from  DigiCert Global Root G2 



Response Payload : 

javid999_0-1711716063277.png


since the issue persists even when redirecting the webhook to a publicly accessible endpoint like https://webhook.site/ , it indicates the problem might not lie within your server's setup but possibly within the webhook's configuration or the originating platform's settings. Ensuring that the webhook URL is correctly formatted and the endpoint is primed to accept POST requests is essential. Additionally, consider examining any IP allowlisting or firewall settings that might inadvertently block incoming webhook requests. Lastly, since your setup involves Azure Appservices and a DigiCert Global Root G2 certificate, ensure that there are no SSL/TLS handshake issues or specific security policies in place that could prevent the webhook from successfully reaching your server.

View solution in original post

0 Upvotes
2 Replies 2
MHelen
Member

Contact change or creation does not call webhook (Responds 403)

SOLVE

Let’s go through some practical steps to troubleshoot and resolve this issue:

Steps to Troubleshoot and Resolve the 403 Error:

  1. Double-Check Webhook URL Configuration:

    • Ensure that the webhook URL you’ve entered in the CRM system is correct and accessible.
    • Look for any potential typos or incorrect paths in the URL.
  2. Inspect Server and Firewall Settings:

    • Verify if there are any firewall rules or security settings on your Azure Appservices that might be blocking the requests.
    • Temporarily disable these rules to see if the webhook works, or explicitly allow the CRM’s IP ranges.
  3. Validate SSL/TLS Configuration:

    • Since you’re using a certificate from DigiCert Global Root G2, ensure that it’s correctly installed on your server.
    • Make sure all intermediate certificates are also properly configured.
  4. Use a Simple Public Endpoint for Testing:

    • To rule out server-specific issues, configure the webhook to a simple public endpoint like webhook.site.
    • If the webhook works here, it indicates the issue might be with your server settings.
  5. Review CRM Webhook Requirements:

    • Go through the CRM webhook documentation again to ensure you haven’t missed any specific configuration steps.
    • Check if there are any required headers or authentication mechanisms you need to implement.
  6. Log Incoming Requests:

    • Implement logging on your server to capture all incoming requests, including headers and payloads.
    • This will help you see if the requests are reaching your server and if there are any discrepancies.
  7. Test with a Different Endpoint:

    • If possible, set up a different endpoint on another server or use a simple API testing service to see if the webhook works there.
    • This can help isolate the issue to your Azure Appservices configuration.
  8. Reach Out for Support:

    • If none of the above steps resolve the issue, contact your CRM’s support team.
    • Provide them with detailed information about your configuration and the 403 error you’re encountering.

Example of a Simple Logging Endpoint (Node.js/Express):

If you’re able to use Node.js, here’s a quick example of how to set up a simple logging endpoint:

const express = require('express');
const app = express();

app.use(express.json());

app.post('/webhook', (req, res) => {
console.log('Headers:', req.headers);
console.log('Body:', req.body);
res.status(200).send('Received');
});

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});

Deploy this simple server and configure your webhook to point to it. Check the logs to see if the requests are coming through.

Regards: Ricardo

0 Upvotes
HMir
Solution
Member

Contact change or creation does not call webhook (Responds 403)

SOLVE

@javid999 wrote:

Hello community,

 I did the following steps with exact order according to webhook docs:


1) Created contact scopes in scopes section

  • crm.objects.contacts.write
  • crm.objects.contacts.read
  • crm.schemas.contacts.read
  • crm.schemas.contacts.write

2) Configured webhook to call our internal endpoint. Currently we do not validate the request by headers so it's publicly available.

3) Created contact

Note : After getting 403 for our internal endpoint, we configured webhooks to https://webhook.site/ assuming our server refuses the request somehow. But both gets 403. 


We checked the incoming requests in our server logs and we do not even get webhooks. We use Azure Appservices and certificate from  DigiCert Global Root G2 



Response Payload : 

javid999_0-1711716063277.png


since the issue persists even when redirecting the webhook to a publicly accessible endpoint like https://webhook.site/ , it indicates the problem might not lie within your server's setup but possibly within the webhook's configuration or the originating platform's settings. Ensuring that the webhook URL is correctly formatted and the endpoint is primed to accept POST requests is essential. Additionally, consider examining any IP allowlisting or firewall settings that might inadvertently block incoming webhook requests. Lastly, since your setup involves Azure Appservices and a DigiCert Global Root G2 certificate, ensure that there are no SSL/TLS handshake issues or specific security policies in place that could prevent the webhook from successfully reaching your server.

0 Upvotes