Getting Started
Follow this step-by-step guide to integrate Thaaigroup Verify in your application. You will create a developer account, create a project, generate API keys, allowlist your domain, and test the OTP flow end-to-end.
Step 1
Create account
Register a developer account
Step 2
Create project
Add app/domain details
Step 3
Get API keys
Copy client_id & secret
Step 4
Integrate & test
Call send/verify APIs
Step 1 — Create a developer account
Create your Thaaigroup Verify developer account. This account owns your projects and API keys.
Tip: Use a team email address for business projects.
Step 2 — Create a project
After login, create a new project. A project represents one website/app integration.
Project details you should provide
- Project name (Example: ThaaimaiFoods)
- Website URL (Example: https://thaaimaifoods.online)
- Allowed domain (Example: thaaimaifoods.online)
- Support contact email (optional)
Domain allowlist (important)
Requests must include
X-Client-Domain that matches your allowlisted domain.
This prevents other websites from using your keys.
Step 3 — Generate API keys
Each project has a Client ID and Client Secret. The secret is shown only once.
How secrets work
- Client ID is safe to display anytime
- Client Secret is shown only once (copy it)
- If lost, you must Regenerate Secret
- Regenerating invalidates the old secret immediately
Keep secrets safe
Store keys in your backend environment variables (.env). Never put secrets in frontend JS.
Step 4 — Integrate in your backend
Add to your .env
VERIFY_CLIENT_ID=your_client_id_here
VERIFY_CLIENT_SECRET=your_client_secret_here
VERIFY_DOMAIN=yourdomain.com
VERIFY_BASE_URL=https://account.thaaigroup.com
Laravel config (config/services.php)
'verify' => [
'base_url' => env('VERIFY_BASE_URL', 'https://account.thaaigroup.com'),
'client_id' => env('VERIFY_CLIENT_ID'),
'client_secret' => env('VERIFY_CLIENT_SECRET'),
'domain' => env('VERIFY_DOMAIN'),
],
Send OTP (Laravel example)
use Illuminate\Support\Facades\Http;
$res = Http::withHeaders([
'X-Client-Id' => config('services.verify.client_id'),
'X-Client-Secret' => config('services.verify.client_secret'),
'X-Client-Domain' => config('services.verify.domain'),
])->post(config('services.verify.base_url').'/api/otp/send', [
'email' => $request->email,
'purpose' => 'signup',
]);
return $res->json();
Verify OTP (Laravel example)
$res = Http::withHeaders([
'X-Client-Id' => config('services.verify.client_id'),
'X-Client-Secret' => config('services.verify.client_secret'),
'X-Client-Domain' => config('services.verify.domain'),
])->post(config('services.verify.base_url').'/api/otp/verify', [
'email' => $request->email,
'otp' => $request->otp,
'purpose' => 'signup',
]);
$data = $res->json();
if (($data['ok'] ?? false) && ($data['verified'] ?? false)) {
// ✅ Create user in your application here
}
return $data;
Recommended: Create the user only after OTP verification succeeds.
Test Checklist
- ✅ Send OTP returns
ok=true - ✅ Email received from account@thaaigroup.com
- ✅ Verify OTP returns
verified=true - ✅ User is created only after OTP success
- ✅ Wrong OTP returns
OTP_INVALID - ✅ Resend too fast returns
RESEND_COOLDOWNwithretry_after
Need help?
If you need onboarding support or want higher limits, contact our team.