Dans cette vidéo je vous présente Ultrahook, un service qui permet de rediriger les webhooks envoyés par Stripe ou par Sendgrid.
Installation
Il vous faut aller sur http://www.ultrahook.com/ et créer votre compte. Dans mon cas et pour la suite, le namespace que j’ai choisis est aymeric
Une fois que vous recevez votre clef faite la commande suivante
$ echo "api_key: MY_API_KEY" > ~/.ultrahook
Utilisation
Rien de plus simple.
$ ultrahook un_id 8000 Authenticated as aymeric Forwarding activated... http://un_id.aymeric.ultrahook.com -> http://localhost:8000
Maintenant vous pouvez utiliser l’url http://un_id.aymeric.ultrahook.com comme endpoint d’un webhook. toute les requêtes seront renvoyer vers http://localhost:8000
Au niveau de la destination, nous avons mis ici 8000, voici toutes les autres possibilité
5000 (http://localhost:5000) localhost:5000 (http://localhost:5000) another.machine.com (http://another.machine.com:80) http://localhost:5000 (http://localhost:5000) http://another.machine.com/path (http://another.machine.com:80/path)
Et voilà, c’est un jeu d’enfant !