@Jaycee_Lewis , thank you so much for your reply. It is a private app, and I have to do a small walk of shame, because I did identify the issue...
When I created my object for deserialization from the JSON payload sent from the Hubspot webhook, 'apparently' I created the 'objectId' field as a string vs. a number 😞
When I changed the type to a number (as shown in the webhooks docs/screenshot) all was good in the world again. Total rookie move and my apologies for taking up your time for an error on my behalf.
We do not have enough information here, and it would be great to have more details. A 400 error occurs when a browser sends a request to a web server that the server cannot understand or process correctly. So, check what type of data your API expects—webhooks send an array of objects but not an object (this is a pretty common mistake)
Howeve maybe I spoke to soon. The 'testing' of the webhook works fine now. However, when I created a contact and the webhook triggered, I actually still receive the 400/bad request.
See the Postman request and response below. For now, my API is just echoing the request back in the response.
Hey @AddaxLab , so definitely 10-4 on the 400, and yes, I may have said 'object' in my original post but my API is in fact setup to receive a JSON array. However, a rookie movie on my part that I happened to notice yesterday. 'Apparently' when I created my object that the Hubspot payload would be deserialized to, in error I created the 'objectId' field as a string vs a number lol. So, when it tried to deserialize it, it was failing and a 400 in this case definitely makes sense. So, another case of a dev just going to quickly and making a rookie mistake.
I can't thank you enough for reaching out to assist!!
Hi, @BigDawg5508👋 Thanks for reaching out. Is this webhook set up using a Private App or using a Public App? Hey @dsmarion@PBaxter@stefen, do you have any webhook setup troubleshooting tips you can share with @BigDawg5508?
Howeve maybe I spoke to soon. The 'testing' of the webhook works fine now. However, when I created a contact and the webhook triggered, I actually still receive the 400/bad request.
See the Postman request and response below. For now, my API is just echoing the request back in the response.
@Jaycee_Lewis , thank you so much for your reply. It is a private app, and I have to do a small walk of shame, because I did identify the issue...
When I created my object for deserialization from the JSON payload sent from the Hubspot webhook, 'apparently' I created the 'objectId' field as a string vs. a number 😞
When I changed the type to a number (as shown in the webhooks docs/screenshot) all was good in the world again. Total rookie move and my apologies for taking up your time for an error on my behalf.
Hey, @BigDawg5508👋 Thanks for taking the time to come back and let us know how you solved the issue. I definitely learn from my mistakes and my victories 😊 — Jaycee