{"id":12817,"date":"2023-07-28T14:47:41","date_gmt":"2023-07-28T05:47:41","guid":{"rendered":"https:\/\/www.eformsign.com\/en\/blog\/?p=12817"},"modified":"2023-07-28T17:10:21","modified_gmt":"2023-07-28T08:10:21","slug":"how-to-test-eformsign-webhooks-in-10-minutes-by-using-webhook-site","status":"publish","type":"post","link":"https:\/\/www.eformsign.com\/en\/blog\/how-to-test-eformsign-webhooks-in-10-minutes-by-using-webhook-site\/","title":{"rendered":"How to test eformsign webhooks in 10 minutes by using webhook.site"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1189\" height=\"629\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/07\/2-6.png\" alt=\"\" class=\"wp-image-12883\" \/><\/figure>\n\n\n\n<p>You can use eformsign webhooks to get notifications whenever a document or a PDF file of a document is generated.<\/p>\n\n\n\n<p>In this blog, you&#8217;ll learn how to test eformsign webhooks using webhook.site, which is an open-source, free service that provides a unique URL for you to receive webhooks for testing purposes.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2>Step 1: Get your own unique URL for receiving webhooks<\/h2>\n\n\n\n<ol><li>First you need to get a unique URL for you to receive eformsign webhooks. To do that, go to webhook.site and copy the unique URL generated for you. You will be using this URL to receive real-time data from eformsign when events are generated.<br><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"1930\" height=\"705\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/06\/webhooksite-unique-url.png\" alt=\"\" data-id=\"12819\" data-link=\"https:\/\/www.eformsign.com\/en\/blog\/?attachment_id=12819\" class=\"wp-image-12819\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2>Step 2: Add a new webhook in eformsign<\/h2>\n\n\n\n<p>2.  N<span style=\"font-size: revert;color: initial\">ow you need to add an eformsign webhook. To do that, simply go to <\/span><strong style=\"font-size: revert;color: initial\">Integration<\/strong><span style=\"font-size: revert;color: initial\"> &gt; <\/span><strong style=\"font-size: revert;color: initial\">API\/Webhook<\/strong><span style=\"font-size: revert;color: initial\"> in the sidebar and click the <\/span><strong style=\"font-size: revert;color: initial\">New Webhook<\/strong><span style=\"font-size: revert;color: initial\"> button.<\/span> <\/p>\n\n\n\n<p>3. Then, name the webhook and paste your unique URL from webhook.site.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1149\" height=\"617\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/06\/new-webhook-popup1.png\" alt=\"\" class=\"wp-image-12822\" \/><\/figure>\n\n\n\n<p>4. Select the&nbsp;<strong>Target<\/strong>&nbsp;documents in which webhooks will be sent whenever an event (document generation) occurs. You can choose from&nbsp;<strong>All documents<\/strong>, <strong>Documents created from my files<\/strong>, and<strong> Documents created from templates<\/strong>. Note that if you choose <strong>Documents created from templates<\/strong>, you need to choose specific templates (you can choose more than one).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1234\" height=\"687\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/06\/new-webhook-target-all-documents.png\" alt=\"\" class=\"wp-image-12824\" \/><\/figure>\n\n\n\n<p>5. Choose the <strong>Authentication type<\/strong> (<strong>No authentication<\/strong>, <strong>Bearer token<\/strong>, <strong>Basic authentication<\/strong>, or <strong>eformsign signature<\/strong>). This is a feature that allows you to authenticate that the incoming webhook is a legitimate webhook from eformsign. In this exercise, we&#8217;ll choose Basic Authentication. For information on other authentication types, refer to the <a href=\"https:\/\/eformsignen.github.io\/developers\/help\/eformsign_webhook_en.html\">eformsign API guide<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"927\" height=\"541\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/06\/basic-authentication.png\" alt=\"\" class=\"wp-image-12826\" \/><\/figure>\n\n\n\n<p>6. Enter your ID and password. It will be Base64-encoded in the form of&nbsp;<strong>ID:password<\/strong>&nbsp;and will be included in the Authorization field of the request header of the incoming webhook, which allows you check whether it is a legitimate one from eformsign.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"960\" height=\"739\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/06\/basic-authentication-ID-PW.png\" alt=\"\" data-id=\"12828\" data-link=\"https:\/\/www.eformsign.com\/en\/blog\/?attachment_id=12828\" class=\"wp-image-12828\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2>Step 3: Send a test request<\/h2>\n\n\n\n<p>7. When you&#8217;re done, click<strong> Register<\/strong> to register the webhook. You can see that the webhook has been registered. You now send a test webhook by clicking <strong>Test<\/strong> under <strong>Action<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"1954\" height=\"497\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/07\/webhook-setup-done-en.png\" alt=\"\" data-id=\"12832\" data-link=\"https:\/\/www.eformsign.com\/en\/blog\/?attachment_id=12832\" class=\"wp-image-12832\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2>Step 4: Check the response on webhook.site<\/h2>\n\n\n\n<p>8. Go back to webhook.site. You can see that a POST request and its results are shown there. Other data such as request details, headers, files, query string, and form values are also shown. You can also validate whether the incoming webhook is from eformsign by checking the ID in the php-auth-user field, and the PW in the php-auth-pw field, as well as Base-64 decoding the value in the authorization field. If these values match the ones you set when adding the webhook, then it means the webhook is from eformsign.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1886\" height=\"1099\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/07\/base-64-decode.png\" alt=\"\" class=\"wp-image-12846\" \/><\/figure>\n\n\n\n<h2>Step 5. Create a document<\/h2>\n\n\n\n<p>9. Now let&#8217;s try sending a production webhook. Since we&#8217;ve set the trigger event to &#8216;All documents&#8217;, when a document is generated, a webhook will be sent to the target URL. In this example, we&#8217;ll create and send a document to a recipient using the <strong>New from my file<\/strong> feature.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1338\" height=\"1129\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/07\/create-and-send-new-from-my-file-en.png\" alt=\"\" class=\"wp-image-12836\" \/><\/figure>\n\n\n\n<h2>Step 6. Check the response on webhook.site for document generation<\/h2>\n\n\n\n<p>10. If you go back to the webhook.site, you can see that three POST requests have been sent to the URL <\/p>\n\n\n\n<p>If we go back to webhook.site, you can see that three POST requests were sent and if we check the request body of the requests, we can see that two document events (document) and one PDF creation event (ready_document_pdf) were generated.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1240\" height=\"1125\" src=\"https:\/\/www.eformsign.com\/en\/blog\/wp-content\/uploads\/sites\/3\/2023\/07\/check-response-onf-webhook-site.png\" alt=\"\" class=\"wp-image-12848\" \/><\/figure>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p>That&#8217;s how you can use webhook.site to easily and quickly test eformsign webhooks. For detailed information on eformsign webhooks, you check out the following guides, <a href=\"https:\/\/eformsignen.github.io\/developers\/help\/eformsign_webhook_en.html\">Using eformsign Webhook<\/a> and <a href=\"https:\/\/app.swaggerhub.com\/apis-docs\/eformsign_api.en\/eformsign_API_2.0\/Webhook-oas3#\/Webhook\/post-webhook\">eformsign Webhook Guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use eformsign webhooks to get notifications whenever a document or a PDF file of a document is generated. In this blog, you&#8217;ll learn how to test eformsign webhooks using webhook.site, which is an open-source, free service that provides a unique URL for you to receive webhooks for testing purposes. Step 1: Get your [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":12883,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[129],"tags":[],"_links":{"self":[{"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/posts\/12817"}],"collection":[{"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/comments?post=12817"}],"version-history":[{"count":21,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/posts\/12817\/revisions"}],"predecessor-version":[{"id":12884,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/posts\/12817\/revisions\/12884"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/media\/12883"}],"wp:attachment":[{"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/media?parent=12817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/categories?post=12817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/blog\/wp-json\/wp\/v2\/tags?post=12817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}