v3 badge position

1,473 views
Skip to first unread message

Justin Svrcek

unread,
Jun 4, 2018, 5:35:56 AM6/4/18
to reCAPTCHA
Is there a way to set the "badge" value to bottomleft or inline while using reCAPTCHA v3 beta?

devchari...@gmail.com

unread,
Jun 11, 2018, 8:18:05 AM6/11/18
to reCAPTCHA
Hi Jusin,

I have the same problem.

A tip in the v3 docs indicates we can use the v2 onload callback to explicitly render the widget.
The invisible reCAPTCHA v2 docs lists a "badge" parameter that we can use to control the badge position.

When I update my page to use the callback/explicit render, the badge is is rendered in the correct position however
it now displays an error message - ERROR for site owner: Invalid key type.

Do you get the same error when using a v3 sitekey?
My guess is we can't use v3 keys with v2 callback method yet.


For example:

<html>
 <head>
   <script type="text/javascript">
     var onloadCallback = function() {
       grecaptcha.render('html_element', {
         'sitekey':'<site key>',
         'badge':'bottomleft'
       })
     };
   </script>
   <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
 </head>
 <body>
   <div id="spacer" style="height:100px; background-color:lightgray;"></div>
   <div id="html_element"></div>
 </body>
</html>


Phelix Downs

unread,
Jun 18, 2018, 8:23:31 AM6/18/18
to reca...@googlegroups.com
I am not familiar with the code fpr v2 and v3 although I did extensive research, but the certificate I am using for the website indicates that I am using v5 upgrade,

--
You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+...@googlegroups.com.
To post to this group, send email to reca...@googlegroups.com.
Visit this group at https://groups.google.com/group/recaptcha.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages