How to use @google-cloud/recaptcha-enterprise - 2 common examples

To help you get started, we’ve selected a few @google-cloud/recaptcha-enterprise examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / nodejs-recaptcha-enterprise / samples / quickstart.js View on Github external
async function main(projectNumber) {
  // Create the reCAPTCHA client library.
  const {
  } = require('@google-cloud/recaptcha-enterprise');
  const client = new RecaptchaEnterpriseServiceV1Beta1Client();

  // format the path to the project (it should be prefaced with projects/).
  const formattedParent = client.projectPath(projectNumber);
  // assessment should contain event with RESPONSE_TOKEN and RECAPTCHA_SITE_KEY:
  // "{'event': {'token': 'RESPONSE_TOKEN', 'siteKey': 'RECAPTCHA_SITE_KEY'}}"
  const assessment = {};

  const request = {
    parent: formattedParent,
    assessment: assessment,

  await client.createAssessment(request);
// [END recaptcha_enterprise_quickstart]
github googleapis / nodejs-recaptcha-enterprise / system-test / fixtures / sample / src / index.js View on Github external
function main() {
  const recaptchaEnterpriseServiceV1Beta1Client = new recaptchaenterprise.RecaptchaEnterpriseServiceV1Beta1Client();


reCAPTCHA Enterprise API client for Node.js

Latest version published 2 months ago

Package Health Score

89 / 100
Full package analysis

Popular @google-cloud/recaptcha-enterprise functions