Testing web hooks

You can try out your web hook by assigning your hook to a word and texting in to that word. However, you'll probably want to test it out a little first, and you can do that various ways.

Using cURL  

cURL is a command line tool for making HTTP requests (amongst other things).  Here's a extended description of simulating what Taykt sends to your web hook using cURL.

The following cURL command simulates a message Taykt would send to your web hook. It assumes you have the word "echo" registered in Taykt and set up to point to http://taykt-demo.appspot.com/echo and that someone has texted in the message "echo me stuff". We've assumed the mobile number texting in has been converted by Taykt to the identifier of "7c48160a-3989-4ffe-9dc3-da2642d6500a":

 $ curl -v  http://taykt-demo.appspot.com/echo -X POST -d 
'pid=7c48160a-3989-4ffe-9dc3-da2642d6500a' -d 'text=echo me stuff'

The resource back from the echo web hook is:

7c48160a-3989-4ffe-9dc3-da2642d6500a sent echo me stuff

HTML form

Another way to test your web hook is to set up a HTML form that POSTs the form fields to your web hook. E.g.,

<html>
<form action="http://your-server.com/your-action" method="POST">
<input type="text" name="pid" value="Sender-ID-here"/>
<input type="text" name="text" value="your_word_here" />
<input type="submit" />
</form>
</html>