How to use the @google-cloud/recaptcha-enterprise.RecaptchaEnterpriseServiceV1Beta1Client function in @google-cloud/recaptcha-enterprise

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 {
    RecaptchaEnterpriseServiceV1Beta1Client,
  } = 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();
}

@google-cloud/recaptcha-enterprise

reCAPTCHA Enterprise API client for Node.js

Apache-2.0
Latest version published 10 days ago

Package Health Score

95 / 100
Full package analysis

Popular @google-cloud/recaptcha-enterprise functions