Hey . I am creating webhook to receive deals notification . I am receiving notification successfully but I want to know if it is possible to receive data of that deal when webhooks fired ? My webhook url is something like this http://xxx-xx-xxx-xxx-55.compute-1.amazonaws.com:3000/getwebhooks/ . While response contains lot of headers but body is empty {}
What additional data are you thinking of besides what is already in the notification?
I don’t believe it’s possible to get more than what is brought in the notification.
I am not looking for just basic data like deal name etc. Does webhook send any specific data regarding webhook action like if we set webhook for deals , does it send deal name and other details about what new deal is added ? In general does pipedrive webhook send any useful data except headers ? This is all pipedrive response I am getting from webhook https://gist.github.com/mohammadobaid1/00cb29de556808be701a87137d0e781c
Hi Mohammad. That doesn’t look like the body data sent by the webhook. It looks more like a whole object…
I would guess that you should read the body of that request (but I might be wrong).
The actual data is a JSON, and it contains much more useful data.
You can quickly set up an endpoint here https://webhook.site to see what you should receive.
Let me know if it helps.
Hello,
For having the same question and found the proper answer to the question
file_get_contents(‘php://input’) is what [Mohammad_Obaid] was looking for.
https://webhook.site does present the data he wanted, but the doc did not specify the name of these data (POST[‘foo’] ?, to get these datas by example)…
My post or my get or my headers did not give me the specific datas. However, the function file_get_contents(‘php://input’) does return them.
You can serialize them and store them somewhere to read it by yourself after the webhook has been fired.