Register Class
import { Register } from "cash-captcha";
const apiKey = "your-api-key-here";
const claimKey = "your-claim-key-here";
const config = { apiUrl: "https://api.cashcaptcha.com" };
const register = new Register(apiKey, claimKey, config);
async function registerNewUser(email, referredBy = "") {
const result = await register.registerUser(email, referredBy);
console.log("New User Registered:", result);
}
// Example: Register a new user
registerNewUser("[email protected]", "your-referral-code");
// Resposne:
// {
// "email": "[email protected]",
// "apiKey": "generated-user-api-key"
//}Generating a Claim Key for a New User
Last updated