ChinqIT VerifyChinqIT Verify

Build with AI

Copy a ready-made prompt into Cursor, Claude or ChatGPT and get a working OTP login for Next.js, Flutter, React Native and more.

Use an AI coding tool to add phone verification in minutes. Pick your stack, copy the prompt and paste it into your tool. It writes the code, and the safe setup is already in the prompt.

How to use

  1. Choose your stack below and click the copy button.
  2. Paste the prompt in the chat of Cursor, Claude Code, ChatGPT or Copilot.
Add phone number verification (OTP) to this project with ChinqIT Verify.
API reference (Markdown): https://docs.sms.chinqit.com/en/api-v2.mdx

## API
- Base URL: https://sms.chinqit.com/api/v2
- Auth: header `X-API-Key`, read from the server environment variable CHINQIT_API_KEY.
- Send a code: POST /code with {"phoneNumber": "+222XXXXXXXX", "channel": "sms", "language": "fr"}
  Success: 200 {"success": true, "messageId": "...", "expiresIn": 600}
- Check a code: POST /check with {"phoneNumber": "+222XXXXXXXX", "otp": "123456", "channel": "sms"}. `otp` is a string of 6 digits.
  Right code: 200 {"success": true, "verified": true}
  Wrong code: 400 {"success": false, "message": "Invalid OTP", "retriesLeft": 2}
  No code to check (expired, already used or never sent): 404
  Too many wrong tries: 400 "Maximum verification attempts exceeded" (also when retriesLeft is 0)
- Retries: send an `Idempotency-Key` header on POST /code with a new UUID for each user action, and reuse the same key if you retry that request. On 409 IDEMPOTENCY_IN_PROGRESS, retry with the same key after Retry-After.
- ChinqIT creates, sends and checks the code (6 digits, valid 10 minutes, 3 tries). Do not create or store codes yourself.
- SMS numbers: Mauritania only, sent as +222 and 8 digits starting with 2, 3 or 4. Accept what users type (spaces, 8-digit local numbers) and normalize it.
- channel: "sms" (default), "whatsapp" (E.164, Mauritania or US) or "email" (send "email" instead of "phoneNumber"). WhatsApp and email must be enabled on the key. Use the same channel for /code and /check.
- language: "fr" (default), "en" or "ar" — the language of the message the user receives.
- If the ChinqIT MCP server is connected (https://docs.sms.chinqit.com/en/connect-ai-tools.mdx), use it to create the API key and webhook instead of asking me.

## Errors (the body usually has "message")
- 400 on /code: invalid number. Tell the user the number is not valid.
- 400 or 404 on /check: see above. On "Invalid OTP" with tries left, let the user try again; otherwise ask them to request a new code.
- 401 or 403: API key problem. Log it on the server; show the user a generic error.
- 402, 403 TRIAL_PAUSED or 429 TRIAL_LIMIT: the ChinqIT account needs credit. Log it for the developer; show the user a generic error.
- Other 429: too many requests. Wait `retryAfter` seconds; tell the user to try again shortly.
- 5xx: temporary. Let the user retry.

## Security rules (must follow)
1. Call ChinqIT only from server code (API route, server action, backend, cloud or edge function). Never put the API key in a mobile app, in browser code or in a public variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar), and never commit it.
2. Add CHINQIT_API_KEY to .env.example with no value.
3. Rate-limit your own send-code endpoint per phone number and per IP address (for example 1 per 60 seconds and 5 per hour per number), so nobody can spend your balance. On serverless hosting, keep the counters in a shared store (database or Redis), not in memory.
4. Treat the user as verified only when /check returns "verified": true, and create the session on the server at that moment.
5. Return your own small result to the app, not ChinqIT's raw response.

## What to build
- A server endpoint that sends the code and one that checks it.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages.
- Follow this project's framework, language, styling and existing sign-in. Write user-facing text in the app's language. Ask me before adding a dependency.
- Test with your own phone number; never hard-code a real number.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.
Add phone number verification (OTP) to this project with ChinqIT Verify.
API reference (Markdown): https://docs.sms.chinqit.com/en/api-v2.mdx

## API
- Base URL: https://sms.chinqit.com/api/v2
- Auth: header `X-API-Key`, read from the server environment variable CHINQIT_API_KEY.
- Send a code: POST /code with {"phoneNumber": "+222XXXXXXXX", "channel": "sms", "language": "fr"}
  Success: 200 {"success": true, "messageId": "...", "expiresIn": 600}
- Check a code: POST /check with {"phoneNumber": "+222XXXXXXXX", "otp": "123456", "channel": "sms"}. `otp` is a string of 6 digits.
  Right code: 200 {"success": true, "verified": true}
  Wrong code: 400 {"success": false, "message": "Invalid OTP", "retriesLeft": 2}
  No code to check (expired, already used or never sent): 404
  Too many wrong tries: 400 "Maximum verification attempts exceeded" (also when retriesLeft is 0)
- Retries: send an `Idempotency-Key` header on POST /code with a new UUID for each user action, and reuse the same key if you retry that request. On 409 IDEMPOTENCY_IN_PROGRESS, retry with the same key after Retry-After.
- ChinqIT creates, sends and checks the code (6 digits, valid 10 minutes, 3 tries). Do not create or store codes yourself.
- SMS numbers: Mauritania only, sent as +222 and 8 digits starting with 2, 3 or 4. Accept what users type (spaces, 8-digit local numbers) and normalize it.
- channel: "sms" (default), "whatsapp" (E.164, Mauritania or US) or "email" (send "email" instead of "phoneNumber"). WhatsApp and email must be enabled on the key. Use the same channel for /code and /check.
- language: "fr" (default), "en" or "ar" — the language of the message the user receives.
- If the ChinqIT MCP server is connected (https://docs.sms.chinqit.com/en/connect-ai-tools.mdx), use it to create the API key and webhook instead of asking me.

## Errors (the body usually has "message")
- 400 on /code: invalid number. Tell the user the number is not valid.
- 400 or 404 on /check: see above. On "Invalid OTP" with tries left, let the user try again; otherwise ask them to request a new code.
- 401 or 403: API key problem. Log it on the server; show the user a generic error.
- 402, 403 TRIAL_PAUSED or 429 TRIAL_LIMIT: the ChinqIT account needs credit. Log it for the developer; show the user a generic error.
- Other 429: too many requests. Wait `retryAfter` seconds; tell the user to try again shortly.
- 5xx: temporary. Let the user retry.

## Security rules (must follow)
1. Call ChinqIT only from server code (API route, server action, backend, cloud or edge function). Never put the API key in a mobile app, in browser code or in a public variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar), and never commit it.
2. Add CHINQIT_API_KEY to .env.example with no value.
3. Rate-limit your own send-code endpoint per phone number and per IP address (for example 1 per 60 seconds and 5 per hour per number), so nobody can spend your balance. On serverless hosting, keep the counters in a shared store (database or Redis), not in memory.
4. Treat the user as verified only when /check returns "verified": true, and create the session on the server at that moment.
5. Return your own small result to the app, not ChinqIT's raw response.

## What to build
- A server endpoint that sends the code and one that checks it.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages.
- Follow this project's framework, language, styling and existing sign-in. Write user-facing text in the app's language. Ask me before adding a dependency.
- Test with your own phone number; never hard-code a real number.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.

## Next.js (App Router) specifics
- Put the ChinqIT calls in `lib/chinqit.ts`, starting with `import "server-only"`.
- Create the route handlers `app/api/otp/send/route.ts` and `app/api/otp/verify/route.ts` (or server actions).
- Build the phone and code form as a client component.
- On success, sign the user in through the project's existing auth (Auth.js, Clerk, Supabase or a custom cookie).
Add phone number verification (OTP) to this project with ChinqIT Verify.
API reference (Markdown): https://docs.sms.chinqit.com/en/api-v2.mdx

## API
- Base URL: https://sms.chinqit.com/api/v2
- Auth: header `X-API-Key`, read from the server environment variable CHINQIT_API_KEY.
- Send a code: POST /code with {"phoneNumber": "+222XXXXXXXX", "channel": "sms", "language": "fr"}
  Success: 200 {"success": true, "messageId": "...", "expiresIn": 600}
- Check a code: POST /check with {"phoneNumber": "+222XXXXXXXX", "otp": "123456", "channel": "sms"}. `otp` is a string of 6 digits.
  Right code: 200 {"success": true, "verified": true}
  Wrong code: 400 {"success": false, "message": "Invalid OTP", "retriesLeft": 2}
  No code to check (expired, already used or never sent): 404
  Too many wrong tries: 400 "Maximum verification attempts exceeded" (also when retriesLeft is 0)
- Retries: send an `Idempotency-Key` header on POST /code with a new UUID for each user action, and reuse the same key if you retry that request. On 409 IDEMPOTENCY_IN_PROGRESS, retry with the same key after Retry-After.
- ChinqIT creates, sends and checks the code (6 digits, valid 10 minutes, 3 tries). Do not create or store codes yourself.
- SMS numbers: Mauritania only, sent as +222 and 8 digits starting with 2, 3 or 4. Accept what users type (spaces, 8-digit local numbers) and normalize it.
- channel: "sms" (default), "whatsapp" (E.164, Mauritania or US) or "email" (send "email" instead of "phoneNumber"). WhatsApp and email must be enabled on the key. Use the same channel for /code and /check.
- language: "fr" (default), "en" or "ar" — the language of the message the user receives.
- If the ChinqIT MCP server is connected (https://docs.sms.chinqit.com/en/connect-ai-tools.mdx), use it to create the API key and webhook instead of asking me.

## Errors (the body usually has "message")
- 400 on /code: invalid number. Tell the user the number is not valid.
- 400 or 404 on /check: see above. On "Invalid OTP" with tries left, let the user try again; otherwise ask them to request a new code.
- 401 or 403: API key problem. Log it on the server; show the user a generic error.
- 402, 403 TRIAL_PAUSED or 429 TRIAL_LIMIT: the ChinqIT account needs credit. Log it for the developer; show the user a generic error.
- Other 429: too many requests. Wait `retryAfter` seconds; tell the user to try again shortly.
- 5xx: temporary. Let the user retry.

## Security rules (must follow)
1. Call ChinqIT only from server code (API route, server action, backend, cloud or edge function). Never put the API key in a mobile app, in browser code or in a public variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar), and never commit it.
2. Add CHINQIT_API_KEY to .env.example with no value.
3. Rate-limit your own send-code endpoint per phone number and per IP address (for example 1 per 60 seconds and 5 per hour per number), so nobody can spend your balance. On serverless hosting, keep the counters in a shared store (database or Redis), not in memory.
4. Treat the user as verified only when /check returns "verified": true, and create the session on the server at that moment.
5. Return your own small result to the app, not ChinqIT's raw response.

## What to build
- A server endpoint that sends the code and one that checks it.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages.
- Follow this project's framework, language, styling and existing sign-in. Write user-facing text in the app's language. Ask me before adding a dependency.
- Test with your own phone number; never hard-code a real number.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.

## Flutter specifics
- The app never calls ChinqIT and never holds the API key. It calls a backend.
- Backend: the project's own server with the two endpoints described above, called from the app with `http` or `dio`. If the project already uses Supabase Auth, follow https://docs.sms.chinqit.com/en/supabase-phone-auth.mdx instead and use `supabase.auth.signInWithOtp(phone:)` and `verifyOTP(type: OtpType.sms)` in the app.
- Code field: `keyboardType: TextInputType.number` and `autofillHints: [AutofillHints.oneTimeCode]`.
- Optional Android auto-read of the code: SMS Retriever (`hash` in the /code request), see https://docs.sms.chinqit.com/en/sms-retriever-guide.mdx.
Add phone number verification (OTP) to this project with ChinqIT Verify.
API reference (Markdown): https://docs.sms.chinqit.com/en/api-v2.mdx

## API
- Base URL: https://sms.chinqit.com/api/v2
- Auth: header `X-API-Key`, read from the server environment variable CHINQIT_API_KEY.
- Send a code: POST /code with {"phoneNumber": "+222XXXXXXXX", "channel": "sms", "language": "fr"}
  Success: 200 {"success": true, "messageId": "...", "expiresIn": 600}
- Check a code: POST /check with {"phoneNumber": "+222XXXXXXXX", "otp": "123456", "channel": "sms"}. `otp` is a string of 6 digits.
  Right code: 200 {"success": true, "verified": true}
  Wrong code: 400 {"success": false, "message": "Invalid OTP", "retriesLeft": 2}
  No code to check (expired, already used or never sent): 404
  Too many wrong tries: 400 "Maximum verification attempts exceeded" (also when retriesLeft is 0)
- Retries: send an `Idempotency-Key` header on POST /code with a new UUID for each user action, and reuse the same key if you retry that request. On 409 IDEMPOTENCY_IN_PROGRESS, retry with the same key after Retry-After.
- ChinqIT creates, sends and checks the code (6 digits, valid 10 minutes, 3 tries). Do not create or store codes yourself.
- SMS numbers: Mauritania only, sent as +222 and 8 digits starting with 2, 3 or 4. Accept what users type (spaces, 8-digit local numbers) and normalize it.
- channel: "sms" (default), "whatsapp" (E.164, Mauritania or US) or "email" (send "email" instead of "phoneNumber"). WhatsApp and email must be enabled on the key. Use the same channel for /code and /check.
- language: "fr" (default), "en" or "ar" — the language of the message the user receives.
- If the ChinqIT MCP server is connected (https://docs.sms.chinqit.com/en/connect-ai-tools.mdx), use it to create the API key and webhook instead of asking me.

## Errors (the body usually has "message")
- 400 on /code: invalid number. Tell the user the number is not valid.
- 400 or 404 on /check: see above. On "Invalid OTP" with tries left, let the user try again; otherwise ask them to request a new code.
- 401 or 403: API key problem. Log it on the server; show the user a generic error.
- 402, 403 TRIAL_PAUSED or 429 TRIAL_LIMIT: the ChinqIT account needs credit. Log it for the developer; show the user a generic error.
- Other 429: too many requests. Wait `retryAfter` seconds; tell the user to try again shortly.
- 5xx: temporary. Let the user retry.

## Security rules (must follow)
1. Call ChinqIT only from server code (API route, server action, backend, cloud or edge function). Never put the API key in a mobile app, in browser code or in a public variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar), and never commit it.
2. Add CHINQIT_API_KEY to .env.example with no value.
3. Rate-limit your own send-code endpoint per phone number and per IP address (for example 1 per 60 seconds and 5 per hour per number), so nobody can spend your balance. On serverless hosting, keep the counters in a shared store (database or Redis), not in memory.
4. Treat the user as verified only when /check returns "verified": true, and create the session on the server at that moment.
5. Return your own small result to the app, not ChinqIT's raw response.

## What to build
- A server endpoint that sends the code and one that checks it.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages.
- Follow this project's framework, language, styling and existing sign-in. Write user-facing text in the app's language. Ask me before adding a dependency.
- Test with your own phone number; never hard-code a real number.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.

## React Native / Expo specifics
- The app never calls ChinqIT and never holds the API key. It calls a backend.
- Backend: the project's own server with the two endpoints described above, called with `fetch`. If the project already uses Supabase Auth, follow https://docs.sms.chinqit.com/en/supabase-phone-auth.mdx instead and use `supabase-js` (`signInWithOtp`, `verifyOtp`).
- Code field: `textContentType="oneTimeCode"`, `autoComplete="sms-otp"` and `keyboardType="number-pad"`.
- Never use an `EXPO_PUBLIC_` variable for the API key.
Add phone number verification (OTP) to this project with ChinqIT Verify.
API reference (Markdown): https://docs.sms.chinqit.com/en/api-v2.mdx

## API
- Base URL: https://sms.chinqit.com/api/v2
- Auth: header `X-API-Key`, read from the server environment variable CHINQIT_API_KEY.
- Send a code: POST /code with {"phoneNumber": "+222XXXXXXXX", "channel": "sms", "language": "fr"}
  Success: 200 {"success": true, "messageId": "...", "expiresIn": 600}
- Check a code: POST /check with {"phoneNumber": "+222XXXXXXXX", "otp": "123456", "channel": "sms"}. `otp` is a string of 6 digits.
  Right code: 200 {"success": true, "verified": true}
  Wrong code: 400 {"success": false, "message": "Invalid OTP", "retriesLeft": 2}
  No code to check (expired, already used or never sent): 404
  Too many wrong tries: 400 "Maximum verification attempts exceeded" (also when retriesLeft is 0)
- Retries: send an `Idempotency-Key` header on POST /code with a new UUID for each user action, and reuse the same key if you retry that request. On 409 IDEMPOTENCY_IN_PROGRESS, retry with the same key after Retry-After.
- ChinqIT creates, sends and checks the code (6 digits, valid 10 minutes, 3 tries). Do not create or store codes yourself.
- SMS numbers: Mauritania only, sent as +222 and 8 digits starting with 2, 3 or 4. Accept what users type (spaces, 8-digit local numbers) and normalize it.
- channel: "sms" (default), "whatsapp" (E.164, Mauritania or US) or "email" (send "email" instead of "phoneNumber"). WhatsApp and email must be enabled on the key. Use the same channel for /code and /check.
- language: "fr" (default), "en" or "ar" — the language of the message the user receives.
- If the ChinqIT MCP server is connected (https://docs.sms.chinqit.com/en/connect-ai-tools.mdx), use it to create the API key and webhook instead of asking me.

## Errors (the body usually has "message")
- 400 on /code: invalid number. Tell the user the number is not valid.
- 400 or 404 on /check: see above. On "Invalid OTP" with tries left, let the user try again; otherwise ask them to request a new code.
- 401 or 403: API key problem. Log it on the server; show the user a generic error.
- 402, 403 TRIAL_PAUSED or 429 TRIAL_LIMIT: the ChinqIT account needs credit. Log it for the developer; show the user a generic error.
- Other 429: too many requests. Wait `retryAfter` seconds; tell the user to try again shortly.
- 5xx: temporary. Let the user retry.

## Security rules (must follow)
1. Call ChinqIT only from server code (API route, server action, backend, cloud or edge function). Never put the API key in a mobile app, in browser code or in a public variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar), and never commit it.
2. Add CHINQIT_API_KEY to .env.example with no value.
3. Rate-limit your own send-code endpoint per phone number and per IP address (for example 1 per 60 seconds and 5 per hour per number), so nobody can spend your balance. On serverless hosting, keep the counters in a shared store (database or Redis), not in memory.
4. Treat the user as verified only when /check returns "verified": true, and create the session on the server at that moment.
5. Return your own small result to the app, not ChinqIT's raw response.

## What to build
- A server endpoint that sends the code and one that checks it.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages.
- Follow this project's framework, language, styling and existing sign-in. Write user-facing text in the app's language. Ask me before adding a dependency.
- Test with your own phone number; never hard-code a real number.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.

## Node / Express backend specifics
- Add two routes: `POST /auth/otp/send` and `POST /auth/otp/verify`.
- Put the ChinqIT calls in a small `chinqit.js` helper that uses `fetch`.
- Add rate-limiting middleware to the send route.
- Issue the session or JWT only after ChinqIT returns `verified: true`.
Send this project's Supabase Auth phone login codes by SMS with ChinqIT Verify.
Guide with the full code (Markdown): https://docs.sms.chinqit.com/en/supabase-phone-auth.mdx

## How it works
- Supabase Auth creates and checks the login code. ChinqIT only delivers the SMS.
- A Supabase "Send SMS" Auth hook, written as an Edge Function, receives the phone number and the code and sends the text through ChinqIT: POST https://sms.chinqit.com/api/v2/notify with header `X-API-Key`.
- Do not call ChinqIT's /code or /check here, and do not create, store or check codes yourself.

## What to build
- The Edge Function from the guide, with its signature check. Secrets: CHINQIT_API_KEY, SEND_SMS_HOOK_SECRET, and optionally CHINQIT_SMS_LANGUAGE (fr, en or ar).
- Turn the hook on in Supabase (Authentication → Hooks → Send SMS hook, HTTPS) and point it at the function.
- In the app: `signInWithOtp({ phone })`, then `verifyOtp({ phone, token, type: "sms" })`. Numbers are Mauritanian: +222 and 8 digits.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages. Use Supabase's own rate limits for phone sign-in.
- Follow this project's framework, language and styling. Write user-facing text in the app's language.

## Security rules (must follow)
1. The API key lives only in the Edge Function secrets. Never put the API key in a mobile app, in browser code or in a public variable, and never commit it.
2. Keep the hook's signature check, so only Supabase can call the function.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.
Add phone number verification (OTP) to this project with ChinqIT Verify.
API reference (Markdown): https://docs.sms.chinqit.com/en/api-v2.mdx

## API
- Base URL: https://sms.chinqit.com/api/v2
- Auth: header `X-API-Key`, read from the server environment variable CHINQIT_API_KEY.
- Send a code: POST /code with {"phoneNumber": "+222XXXXXXXX", "channel": "sms", "language": "fr"}
  Success: 200 {"success": true, "messageId": "...", "expiresIn": 600}
- Check a code: POST /check with {"phoneNumber": "+222XXXXXXXX", "otp": "123456", "channel": "sms"}. `otp` is a string of 6 digits.
  Right code: 200 {"success": true, "verified": true}
  Wrong code: 400 {"success": false, "message": "Invalid OTP", "retriesLeft": 2}
  No code to check (expired, already used or never sent): 404
  Too many wrong tries: 400 "Maximum verification attempts exceeded" (also when retriesLeft is 0)
- Retries: send an `Idempotency-Key` header on POST /code with a new UUID for each user action, and reuse the same key if you retry that request. On 409 IDEMPOTENCY_IN_PROGRESS, retry with the same key after Retry-After.
- ChinqIT creates, sends and checks the code (6 digits, valid 10 minutes, 3 tries). Do not create or store codes yourself.
- SMS numbers: Mauritania only, sent as +222 and 8 digits starting with 2, 3 or 4. Accept what users type (spaces, 8-digit local numbers) and normalize it.
- channel: "sms" (default), "whatsapp" (E.164, Mauritania or US) or "email" (send "email" instead of "phoneNumber"). WhatsApp and email must be enabled on the key. Use the same channel for /code and /check.
- language: "fr" (default), "en" or "ar" — the language of the message the user receives.
- If the ChinqIT MCP server is connected (https://docs.sms.chinqit.com/en/connect-ai-tools.mdx), use it to create the API key and webhook instead of asking me.

## Errors (the body usually has "message")
- 400 on /code: invalid number. Tell the user the number is not valid.
- 400 or 404 on /check: see above. On "Invalid OTP" with tries left, let the user try again; otherwise ask them to request a new code.
- 401 or 403: API key problem. Log it on the server; show the user a generic error.
- 402, 403 TRIAL_PAUSED or 429 TRIAL_LIMIT: the ChinqIT account needs credit. Log it for the developer; show the user a generic error.
- Other 429: too many requests. Wait `retryAfter` seconds; tell the user to try again shortly.
- 5xx: temporary. Let the user retry.

## Security rules (must follow)
1. Call ChinqIT only from server code (API route, server action, backend, cloud or edge function). Never put the API key in a mobile app, in browser code or in a public variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar), and never commit it.
2. Add CHINQIT_API_KEY to .env.example with no value.
3. Rate-limit your own send-code endpoint per phone number and per IP address (for example 1 per 60 seconds and 5 per hour per number), so nobody can spend your balance. On serverless hosting, keep the counters in a shared store (database or Redis), not in memory.
4. Treat the user as verified only when /check returns "verified": true, and create the session on the server at that moment.
5. Return your own small result to the app, not ChinqIT's raw response.

## What to build
- A server endpoint that sends the code and one that checks it.
- A screen: phone number → "Send code" → 6-digit code → "Verify", with "Resend" after 60 seconds and clear error messages.
- Follow this project's framework, language, styling and existing sign-in. Write user-facing text in the app's language. Ask me before adding a dependency.
- Test with your own phone number; never hard-code a real number.

No API key yet? Create a free account at https://dashboard.sms.chinqit.com/signup?utm_source=ai, then open API keys and create a key.

## Firebase specifics
- Follow https://docs.sms.chinqit.com/en/firebase-phone-auth.mdx. Where its sample code differs from the rules above, the rules above win (for example, return your own small result, not the ChinqIT response).
- Use the project's own server to send and check the code with POST /code and POST /check.
- After `verified: true`, return a Firebase custom token from `admin.auth().createCustomToken`.
- The app then calls `signInWithCustomToken`.

The prompt never contains an API key. Your key stays in the CHINQIT_API_KEY variable on your server. No account yet? Create one for free, then create a key in API keys.

Want your AI tool to create the API key and webhook itself? Connect it to your account.

For your AI tool

Every page of this site is available as Markdown: add .mdx to its address. The whole documentation is in one file at /llms-full.txt, and the page list is at /llms.txt.

On this page