Webhook payloads?
I'm trying to implement a webhook so that I know whenever a new discussion is created. The configuration was easy, and my server is getting pinged appropriately.
I'm supposed to be getting a JSON payload with the details of the discussion. But as far as I can tell, I'm not getting that information.
I'm using PHP. How is the JSON payload transferred? Is it POST data? Do you have any sample code for working with webhooks and PHP?
Thanks!
Discussions are closed to public comments.
If you need help with Tender please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

1 Posted by Hobson on 28 May, 2010 11:06 PM
Web hooks post multipart file data. A common mistake in PHP is to use the $_POST var, which only holds form data. The following thread should help:
http://stackoverflow.com/questions/1075513/php-parsing-multipart-fo...
Regards,
-hobson
Hobson closed this discussion on 28 May, 2010 11:06 PM.
August re-opened this discussion on 29 May, 2010 03:55 AM
2 Posted by August on 29 May, 2010 03:55 AM
I've tried all of the PHP "ins" including $_FILES (referenced in the Stackoverflow URL you sent), $_POST, and $_REQUEST.
However, I'm still not getting any data, JSON or otherwise.
And I suppose the "do you have sample code" answer is no? If that's the case, I would recommend that perhaps you acquire some.
Suggestions?
August Trometer
Co-founder
Yowza!!
Savings in Your Pocket
www.getyowza.com
3 Posted by August on 04 Jun, 2010 06:09 PM
Hello?
4 Posted by Hobson on 08 Jun, 2010 12:49 AM
Hi August, sorry for the delay.
We don't have any sample PHP code for consuming web hooks. I just examined our web hook code and I was mistaken about the multipart file data, it's just normal POST content. I cannot tell you why you are unable to see this data, as I am not a PHP programmer and am unfamiliar with those APIs. If there is a way to view the raw data from a request in PHP I'd look for that. If I run across some sample PHP code for consuming Tender's web hooks I'll let you know.
Regards,
-hobson
5 Posted by Hobson on 08 Jun, 2010 12:55 AM
I just followed my own advice and found this:
http://php.net/manual/en/reserved.variables.httprawpostdata.php
Good luck,
-hobson
Hobson closed this discussion on 12 Jul, 2010 07:01 PM.