Reputation: 1
I am trying to implement google recaptcha in my app using the instructions given in the google cloud: https://cloud.google.com/recaptcha-enterprise/docs/instrument-ios-apps.
I am able to successfully get the recaptchaToken but not able to verify recaptcha with the given api from https://www.google.com/recaptcha/api/siteverify i.e i am getting false response when i pass the recaptchaToken and secretKey to verify the flow.
Upvotes: 0
Views: 2453
Reputation: 55
It appears that you might be using the reCAPTCHA legacy secret key to validate the token, which is designed specifically for websites. In order to validate tokens generated from iOS or Android apps, you need to use the Assessment API.
To validate Google reCAPTCHA token, please follow the guidance provided in the official documentation for integrating the Assessment API, which can be found here: (https://cloud.google.com/recaptcha-enterprise/docs/getting-started).
By following the instructions in the provided documentation, you should be able to verify the reCAPTCHA token successfully.
Upvotes: -1