# Send info of webhook to api php

**URL:** <https://community.hubspot.com/t/send-info-of-webhook-to-api-php/13952>\
**Category:** APIs & Integrations\
**Tags:** webhooks\
**Created:** [April 10, 2019, 10:57pm UTC](https://community.hubspot.com/t/send-info-of-webhook-to-api-php/13952 "2019-04-10T22:57:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariel\_cu4tro](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ariel_cu4tro/32/65671_2.png) [@ariel\_cu4tro](https://community.hubspot.com/u/ariel_cu4tro)\
**Post date:** [April 10, 2019, 10:57pm UTC](https://community.hubspot.com/t/send-info-of-webhook-to-api-php/13952/1 "2019-04-10T22:57:30Z")

</div>

i have workflow and send webhook when i create a ticket, this info send to a page web external (php) but no recieve nothing. I recieve with “print\_r($\_POST)”

---

<div class="post-metadata">

**Author:** ![lscanlan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lscanlan/32/66262_2.png) [@lscanlan](https://community.hubspot.com/u/lscanlan)\
**Post date:** [April 12, 2019, 4:36pm UTC](https://community.hubspot.com/t/send-info-of-webhook-to-api-php/13952/2 "2019-04-12T16:36:50Z")

</div>

Hi [@ariel\_cu4tro](https://community.hubspot.com/t5/user/viewprofilepage/user-id/91750),

Could you give us some more details about how you’re receiving the webhook data? I think I might have found the workflow that you’re referring to (ID 2276654). I’m seeing 142 enrollments and when I look at the history I’m seeing succesful POSTs for the webhooks. So I’m wondering if there’s something about the way you’re receiving the data that’s just not picking up the payload. Or if there’s another workflow that I should be looking at, let me know. And are you able to receive the webhooks from other workflows, but just not this one?

- Leland

---

<div class="post-metadata">

**Author:** ![starrcopaul](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/starrcopaul/32/27089_2.png) [@starrcopaul](https://community.hubspot.com/u/starrcopaul)\
**Post date:** [August 19, 2020, 8:32pm UTC](https://community.hubspot.com/t/send-info-of-webhook-to-api-php/13952/3 "2020-08-19T20:32:07Z")

</div>

Different person, same problem. I can see the data using TCPdump:

15:24:15.899792 IP (tos 0x0, ttl 64, id 57974, offset 0, flags [DF], proto TCP (6), length 1098)  
10.11.101.120.50596 \> 10.11.101.170.80: Flags [P.], cksum 0x1dd5 (correct), seq 1:1047, ack 1, win 502, options [nop,nop,TS val 1910695502 ecr 4253394573], length 1046: HTTP, length: 1046  
POST /webhooks/hubspot/ HTTP/1.1  
Host: www1.xxxxxx.xxx  
X-HubSpot-Signature: 708ec3d35c156d2198f2f0ea9afa238f53703a8fa7df7656c9f59ae9181d909d  
X-HubSpot-Signature-Version: v1  
Content-Type: application/json  
User-Agent: HubSpot Connect 2.0 ([http://dev.hubspot.com/](http://dev.hubspot.com/)) - WebhooksExecutorDaemon-executor  
X-HubSpot-Timeout-Millis: 10000  
X-Trace:  
accept: \*/\*  
X-Forwarded-For: 54.174.55.139  
X-Forwarded-Host: [webhooks.xxxxx.com](http://webhooks.xxxxx.com)  
X-Forwarded-Server: [webhooks.xxxxx.com](http://webhooks.xxxxx.com)  
Connection: Keep-Alive  
Content-Length: 525

[{“eventId”:303578749,“subscriptionId”:xx48xx,“portalId”:xxxxx,“appId”:xx42xx,“occurredAt”:1597868655244,“subscriptionType”:“contact.propertyChange”,“attemptNumber”:0,“objectId”:xxxxx,“propertyName”:“phone”,“propertyValue”:“3143212222”,“changeSource”:“CRM\_UI”},{“eventId”:1340858813,“subscriptionId”:xx48xx,“portalId”:xxxxx,“appId”:xx42xx,“occurredAt”:1597868655244,“subscriptionType”:“contact.propertyChange”,“attemptNumber”:0,“objectId”:xxxx,“propertyName”:“lastname”,“propertyValue”:“Hoch”,“changeSource”:“CRM\_UI”}][!http]

I’ve tried var\_dump’ing, printf’ing, json\_decode’ing, foreach looping, etc, etc. I’m at a loss as to what else to try. At this point I’m just trying random solutions found online for interpretting JSON POST payloads in PHP. No joy… 😞

Do you have a _simple_ example for receiving webhook data with PHP? Currently all I seem to be getting is the content length, which isn’t terribly helpful.

I’m probably just doing/missing something dumb…

---

<div class="post-metadata">

**Author:** ![starrcopaul](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/starrcopaul/32/27089_2.png) [@starrcopaul](https://community.hubspot.com/u/starrcopaul)\
**Post date:** [August 24, 2020, 8:00pm UTC](https://community.hubspot.com/t/send-info-of-webhook-to-api-php/13952/4 "2020-08-24T20:00:26Z")

</div>

I was doing something dumb… Super simple… This will get you data in PHP:

`$json = file_get_contents('php://input');error_log($json);`

You can do fancy stuff with it after putting it in an array:

`$json = file_get_contents('php://input');$response=json_decode($json, TRUE);`

Just a foreach will work.
