androidkotlinrecaptcharecaptcha-enterprise

ReCaptcha key was requesting tokens (executes), but isn't anymore. Why?


I implemented the ReCaptcha Enterprise in the android application as it is in the documentation (https://cloud.google.com/recaptcha-enterprise/docs/instrument-android-apps). The key was generated in the Google Cloud account. The recaptcha is used while registering the new user which data is saved in the backend API database.

    private fun registerCall() {
        lifecycleScope.launch {
            recaptchaClient.execute(RecaptchaAction.SIGNUP)
                .onSuccess { captchaToken ->
                    registerViewModel.register(
                        name = nameText,
                        surname = lastNameText,
                        email = emailText,
                        password = passwordText,                     
                        captchaToken = captchaToken
                    )
                }
                .onFailure { exception ->
                    registerFailed(getString(R.string.please_try_again_later))
                }
        }
    }

The requests to the recaptcha are visible in the google cloud (so the initialization works great) but I also have an issue with ERROR: enter image description here

The metrics visible in the Google Cloud: enter image description here


Solution

  • In my case I tried to use recaptcha later that day by requesting token in the app and the prompt was gone. The error changed from that from main description to:

    "Finish setting up your key: Request scores
    To fully protect your site or app, finish setting up your key. Your key is requesting tokens (executes), but isn't requesting scores (assessments)."

    Which gives me correct info about not implemented assessment endpoint - not done yet. I think that after some time of not using/not asking for recaptcha token the message error is: "Your key isn't requesting tokens" (like in the description). In the next day I again have this error message - so in my case the answer is the unused recaptcha for some time.