SDK reference for web applications
Supported browsers:
- Google Chrome version 52 and above;
- Microsoft Edge version 79 and above;
- Firefox version 57 and above;
- Safari version 11 and above;
- Opera version 39 and above;
- Yandex Browser version 16.9 and above.
The captchaWidget.show() method displays the captcha widget to the user in a web application. The captcha widget is displayed in a popup window (iframe).
Method parameters:
Parameter | Required | Type | Description |
|---|---|---|---|
|
| HTML element in which to display the captcha widget | |
|
| Captcha type. Possible values:
| |
|
| Link to launch the widget in the frontend of your application, obtained from the
| |
|
| Captcha type. Possible value — | |
|
| Captcha autofocus flag. Used only for the
| |
|
| Color scheme of the captcha widget. Possible values:
By default, matches the color scheme of the page or application where the captcha is integrated | |
|
| Localization language. If not specified, the value will be determined on the server. Possible values:
| |
|
| Callback notification about captcha closing |
The method returns a promise object with the captcha pass result:
promise resolve <CAPTCHA_PASS_TOKEN>promise reject <ERROR>
Here:
<CAPTCHA_PASS_TOKEN>— successful captcha pass token if the user passed the captcha;<ERROR>—closeerror if the user closed the captcha window.
The captchaWidget.close() method closes the captcha widget. The method returns nothing in the response.
Example of method call:
captchaWidget.close();