{"id":37719,"date":"2024-03-28T15:00:55","date_gmt":"2024-03-28T09:30:55","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=37719"},"modified":"2024-03-28T15:00:55","modified_gmt":"2024-03-28T09:30:55","slug":"a-guide-to-integrating-google-re-captcha-in-power-pages","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2024\/03\/a-guide-to-integrating-google-re-captcha-in-power-pages\/","title":{"rendered":"A Guide to Integrating Google re-Captcha in Power Pages"},"content":{"rendered":"<p style=\"text-align: justify;\">As we know, Google&#8217;s re-CAPTCHA service incorporates various mechanisms, including advanced risk analysis and adaptive challenges, to differentiate between legitimate users and potential bots or malicious actors. By analysing user behaviour and various risk factors, captcha aims to provide a seamless experience for genuine users while effectively blocking automated bots and other abusive activities on websites.<\/p>\n<p style=\"text-align: justify;\">This approach helps protect websites from a wide range of abusive behaviours, including spamming contact forms, creating fake accounts, performing fraudulent transactions, and other malicious activities. It enhances the overall security and integrity of online platforms, allowing legitimate users to interact with websites without unnecessary interruptions while thwarting potential threats posed by automated scripts or bots.<\/p>\n<p style=\"text-align: justify;\">Recently, we had a client requirement where the client had mandated the integration of Google re-CAPTCHA into Power Pages, replacing the Out-of-the-Box (OOB) solution. This shift marks a pivotal moment in ensuring robust protection against malicious activities while streamlining user interactions. This blog outlines the systematic process of integrating Google re-CAPTCHA seamlessly into Power Pages, thereby fortifying the security framework and elevating user engagement.<\/p>\n<h2><strong>Step 1: <\/strong><\/h2>\n<p>Firstly, to integrate the Google re-CAPTCHA, we need the site key. So, to get the site key, we have to register our site using this <a href=\"https:\/\/www.google.com\/recaptcha\/admin\/create#createsite\" target=\"_blank\" rel=\"noopener\">link<\/a>. Add the domain name in the highlighted part.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37724\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"1557\" height=\"849\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1.png 1557w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1-300x164.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1-1024x558.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1-768x419.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1-1536x838.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-1-660x360.png 660w\" sizes=\"(max-width: 1557px) 100vw, 1557px\" \/><\/p>\n<p>Once you add the domain, click on the &#8216;submit&#8217; button, and you will be redirected to the page where you will be able to see the \u2018site key\u2019. Refer to the below screenshot<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37725\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-2.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"1233\" height=\"624\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-2.png 1233w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-2-300x152.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-2-1024x518.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-2-768x389.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-2-660x334.png 660w\" sizes=\"(max-width: 1233px) 100vw, 1233px\" \/><\/p>\n<h2><strong>Step 2: <\/strong><\/h2>\n<p>Now to add the Google re-CAPTCHA to our portal, we have to write some HTML code.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37726\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-3.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"1056\" height=\"248\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-3.png 1056w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-3-300x70.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-3-1024x240.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-3-768x180.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-3-660x155.png 660w\" sizes=\"(max-width: 1056px) 100vw, 1056px\" \/>In this, we have taken 2 input fields and one div with id \u2013 \u2018HTML-element\u2019 in which our Google re-CAPTCHA will be visible.<\/p>\n<h2><strong>Step 3:<\/strong><\/h2>\n<p>Add this link to your HTML.<\/p>\n<pre class=\"lang:css gutter:true start:1\">&lt;script src=\"https:\/\/www.google.com\/recaptcha\/api.js?onload=onloadCallback&amp;amp;render=explicit\" async=\"\"\r\ndefer=\"\"&gt;\r\n&lt;\/script&gt;\r\n<\/pre>\n<p><strong>Step 4:<\/strong><\/p>\n<p>Now add the given onload function to the JavaScript file.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37727\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-4.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"1120\" height=\"187\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-4.png 1120w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-4-300x50.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-4-1024x171.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-4-768x128.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-4-660x110.png 660w\" sizes=\"(max-width: 1120px) 100vw, 1120px\" \/><\/p>\n<p>Using this function, your Google Captcha will be visible on your HTML page.<\/p>\n<div style=\"text-align: center;\">\n<p><img decoding=\"async\" class=\"alignnone wp-image-37728\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-5.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"478\" height=\"432\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-5.png 730w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-5-300x271.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-5-660x597.png 660w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/p>\n<\/div>\n<h2><strong>Step 5:<\/strong><\/h2>\n<p>Now, when we click on \u201cI\u2019m not a robot,\u201d we will get to see this type of puzzle.<\/p>\n<div style=\"text-align: center;\">\n<p><img decoding=\"async\" class=\"alignnone wp-image-37729\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-6.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"466\" height=\"376\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-6.png 653w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-6-300x242.png 300w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/p>\n<\/div>\n<h2><strong>Step 6:<\/strong><\/h2>\n<p>This code will create the contact when it gets the response from the captcha. If there is no response from the captcha, then it will throw a pop-up message to fill the captcha.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37730\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-7.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"1234\" height=\"727\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-7.png 1234w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-7-300x177.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-7-1024x603.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-7-768x452.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-7-660x389.png 660w\" sizes=\"(max-width: 1234px) 100vw, 1234px\" \/><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-37720\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-8.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"541\" height=\"444\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-8.png 541w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-8-300x246.png 300w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/div>\n<p>As you can see in the above image, the captcha is not clicked, so it will give an error message in the pop-up.<\/p>\n<p>Note: This validation pop-up is a custom modal created using HTML, CSS, and JS.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-37721\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-9.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"604\" height=\"433\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-9.png 604w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-9-300x215.png 300w\" sizes=\"(max-width: 604px) 100vw, 604px\" \/><img decoding=\"async\" class=\"alignnone size-full wp-image-37722\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-10.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"521\" height=\"452\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-10.png 521w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-10-300x260.png 300w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37723\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-11.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"627\" height=\"454\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-11.png 627w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-11-300x217.png 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/p>\n<\/div>\n<p>Once all the fields are filled out, the contact with the given first and last name will be created.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-37731\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-12.png\" alt=\"Integrate Google re-Captcha in Power Pages\" width=\"1445\" height=\"669\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-12.png 1445w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-12-300x139.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-12-1024x474.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-12-768x356.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/03\/Integrate-Google-re-Captcha-in-Power-Pages-12-660x306.png 660w\" sizes=\"(max-width: 1445px) 100vw, 1445px\" \/><\/p>\n<p><strong>Conclusion<\/strong>:<\/p>\n<p>This blog outlines the process of integrating the Google re-CAPTCHA into the Power pages and performing the WebAPI operations according to the captcha response.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/services\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-36464 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/11\/Discover-How-Inogics-Power-Platform-Services-Can-Help-You-Harness-the-Power-of-Low-Code-with-Microsoft-Power-Platform.-1.png\" alt=\"Microsoft Power Platform\" width=\"700\" height=\"200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/11\/Discover-How-Inogics-Power-Platform-Services-Can-Help-You-Harness-the-Power-of-Low-Code-with-Microsoft-Power-Platform.-1.png 700w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/11\/Discover-How-Inogics-Power-Platform-Services-Can-Help-You-Harness-the-Power-of-Low-Code-with-Microsoft-Power-Platform.-1-300x86.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/11\/Discover-How-Inogics-Power-Platform-Services-Can-Help-You-Harness-the-Power-of-Low-Code-with-Microsoft-Power-Platform.-1-660x189.png 660w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we know, Google&#8217;s re-CAPTCHA service incorporates various mechanisms, including advanced risk analysis and adaptive challenges, to differentiate between legitimate users and potential bots or malicious actors. By analysing user behaviour and various risk factors, captcha aims to provide a seamless experience for genuine users while effectively blocking automated bots and other abusive activities on\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2024\/03\/a-guide-to-integrating-google-re-captcha-in-power-pages\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2763],"tags":[2858],"class_list":["post-37719","post","type-post","status-publish","format-standard","hentry","category-power-pages","tag-google-re-captcha"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/37719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=37719"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/37719\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=37719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=37719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=37719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}