grecaptcha.ready(function () { grecaptcha.execute('6LeHH-8UAAAAACVGuhRb_Y3GQbzUIV1NL3pAWuGj', { action: 'homepage' }).then(function (token) { console.log(token); }); });