/** * Instantiate the reCAPTCHA Enterprise client and make request. * @param {string} projectNumber The project number to use when making requests. */asyncfunctionmain(projectNumber){// Create the reCAPTCHA client library.const{RecaptchaEnterpriseServiceClient,}=require('@google-cloud/recaptcha-enterprise');constclient=newRecaptchaEnterpriseServiceClient();// format the path to the project (it should be prefaced with projects/).constformattedParent=client.projectPath(projectNumber);// assessment should contain event with RESPONSE_TOKEN and RECAPTCHA_SITE_KEY:// "{'event': {'token': 'RESPONSE_TOKEN', 'siteKey': 'RECAPTCHA_SITE_KEY'}}"constassessment={};constrequest={parent:formattedParent,assessment:assessment,};awaitclient.createAssessment(request);}
Nächste Schritte
Informationen zum Suchen und Filtern von Codebeispielen für andere Google Cloud-Produkte finden Sie im Google Cloud-Beispielbrowser.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],[],[],[]]