mcaptcha-api-rs/README.md

834 B

status-badge


mcaptcha-api-rs: Library to interact with with mCaptcha API

This library provides a convenient interface to validate mCaptcha authorization tokens presented by Visitors against your mCaptcha instances. It uses reqwest, and native-tls under the hood to communicate with the API.

Install

cargo add mcaptcha-api-rs

Example

use url::Url;
use mcaptcha_api_rs::MCaptcha;

let mcaptcha = MCaptcha::new("sitekeyfromdashboard", "secretfromdashboadr", Url::parse("https://mcaptcha.example.com").unwrap());
assert!(mcaptcha.verify("authorizationtokenfromvisitor").await.unwrap());