Google reCAPTCHA API helps you detect abusive traffic on your website without any user friction. It does this by presenting CAPTCHA challenges to users they need to solve before submitting forms, ensuring these actions are not generated by bots. The API returns a score, helping you decide what action to take for your website: for instance, you might require further verification for low-scoring users. With Pipedream's ability to integrate with various APIs, you can create custom workflows that trigger upon the result of a reCAPTCHA verification, streamlining both security and user experience.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_recaptcha: {
type: "app",
app: "google_recaptcha",
}
},
async run({steps, $}) {
const data = {
"secret": `${this.google_recaptcha.$auth.secret}`,
"response": ``,
"remoteip": ``,
}
return await axios($, {
method: "post",
url: `https://www.google.com/recaptcha/api/siteverify`,
data,
})
},
})
User Verification Workflow: After a user completes a reCAPTCHA challenge on your site, use Pipedream to send the token to Google's reCAPTCHA API for verification. Depending on the score, trigger different actions: for high scores, proceed with form submission; for low scores, prompt additional verification or log the attempt for review.
Anti-Fraud Order Processing: Integrate reCAPTCHA verification with an e-commerce platform like Shopify. Before processing a payment, verify the user with reCAPTCHA. If the score is high, automate the order process; if it's low, flag the order and alert your fraud prevention team for manual review.
Automated Content Moderation: For a user-generated content platform, implement reCAPTCHA to vet submissions. Use Pipedream workflows to verify submissions and based on reCAPTCHA scores, either automatically approve posts, queue them for moderation, or block them. Link this with a content management system (CMS) like WordPress for seamless operation.
Validate a Google reCAPTCHA request (v2 or v3). See docs here
Google reCAPTCHA uses API keys for authentication. When you connect your Google reCAPTCHA account, Pipedream securely stores the keys so you can easily authenticate to Google reCAPTCHA APIs in both code and no-code steps.