CAPTCHA in App

Hi, there´s a way to add captcha to the apps made with appsheet?

@Sebastian_Avila
I’m afraid that’s not possible.

@Sebastian_Avila
I’ve made a small research. It might be possible to use it with rendering an HTML page showing internally in the app and if the result is successful, it might be possible to execute the app (or re-open or re-sync the app) via a callback URL which will point out to the full URL of the app or even to a specific view with a deeplink. This solution requires scripting, HTML rendering and use of reCAPTCHA v3 API. You can check it from here:
https://developers.google.com/recaptcha/intro

2 Likes

thank you! i´ll try to do that.

@Sebastian_Avila, may I ask what is the intent of the recaptcha?

I´m making an app with form view and i´m trying to avoid abuse from users.

Would putting a time / frequency limit on user submissions be a solution? i.e. only allow a submission every minute?

1 Like

i think it might be easier to do. Thank you

@Sebastian_Avila
reCaptcha is for web interface and it’s to protect web email lists from web crawlers or bots. So I believe it might be useless in your case. Is your app public?

Yes, the app is public

@Sebastian_Avila
How do you distribute the app or let the users download and use it? Is the app white-labelled?

The app is white labelled and the i´m sharing the browser link

@Sebastian_Avila
I believe there is no problem with the white-labelled app. With the browser link, I believe it’s a bit hard for any web-crawler to abuse your form(s). Despite this you want to protect the app from mocking, users can request a one time password with filling a simple form with submitting their email and a workflow rule can send them a UNIQUEID() and they can fill the form with that ID.

That´s a good idea but i want the user experience to be a simple one. I think i´ll go with Jonathon suggestion to restrinct the frequency submission.

@Sebastian_Avila
Was this what you were asking actually? Please click on your name on the Home screen to test. It will show you a deck view named User Verification and clicking the deck view item will take you to a sample HTML page that I have set with g-recaptcha div tag. When testing it with browser, it will launch in a parent window but it’s set as an internal URL inside the app. After verification, the browser will launch our website (www.able3ventures.com) but it can be redirected to any URL you want.

Yes that could work! Did you do that by following the steps you mentioned in the first comment of the post? Or did you do anything different?

@Sebastian_Avila
Correct. You can download the sample app from my portfolio here > https://www.appsheet.com/portfolio/245151
Other than that, you need to initialize Google Recaptcha both for your domain and for appsheet.com from https://www.google.com/recaptcha and get your SITE KEY & SECRET. After that you need to set-up a simple HTML page (you can downlaod my sample from below link) which will render reCaptcha and upload the HTML file to your domain. Between the head tags, you will notice a JS function which is executed after g-recaptcha response token is received where you can set the CallBack URL.

HTML File >> https://drive.google.com/file/d/13a6VE5FNckyReoHbH12xxo-6xl4fqHUv/view?usp=sharing

1 Like

Thank you i was following those steps already. You´ve been very helpful.

You’re welcome @Sebastian_Avila, truly my pleasure to be helped of. Could you please mark my response as solution provided it fits your requirements and suits your needs? It might be helpful for other community members as well if they search for the solution tag. Thank you.

1 Like

@Sebastian_Avila
An alternative solution might be with a PHP file besides a HTML file. I have created a sample PHP file for you which you can download from the below link. The approach is a bit different and it contains a by-default disabled button on load under the reCaptcha which can be enabled only-if reCaptcha is checked and clicking that button takes you to the URL you have specified. Just FYI.

PHP File >> https://drive.google.com/file/d/1v9VO-jHTfO5Lwa4x5pwYeU2lbIU8vSYF/view?usp=sharing

1 Like