# Quickstart

> Send your first verification code and check it in five minutes, without sending a real message.

OTP.ps sends one-time verification codes by text message to Palestinian mobile numbers on **Jawwal (059)** and **Ooredoo (056)**, in Arabic or English, starting with your business's name. Your server makes two calls: one to send a code, one to check what the customer typed.

## 1. Get a test key

[Create an account](https://otp.ps/signup). You get a **test key** (`otp_test_…`) straight away, on the dashboard's **API keys** page. Test keys never send a message and never cost anything, and they work before your account is approved.

Keep the key in an environment variable on your server:

```bash
OTP_PS_API_KEY=otp_test_your_key_here
```

## 2. Send a code

`0599000001` is a [sandbox number](/docs/sandbox): with a test key, its code is always `1234`.

```bash
curl https://otp.ps/api/v1/verify/send \
  -H "Authorization: Bearer $OTP_PS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "0599000001", "purpose": "verify", "locale": "ar"}'
```

```json
{
  "id": "ver_9f2KxQe1Lm0aBcDe",
  "status": "pending",
  "to": "0599 ••• 001",
  "network": "jawwal",
  "purpose": "verify",
  "locale": "ar",
  "segments": 0,
  "attempts": 0,
  "test": true,
  "created_at": "2026-11-19T10:00:00.000Z",
  "expires_at": "2026-11-19T10:05:00.000Z",
  "verified_at": null,
  "test_code": "1234"
}
```

Keep the `id` on your server (in the session or on the order). With a live key, the customer receives:

> متجر نور: رمز التحقق 4821، صالح 5 دقائق، لا تشاركه.

## 3. Check the code

```bash
curl https://otp.ps/api/v1/verify/check \
  -H "Authorization: Bearer $OTP_PS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "ver_9f2KxQe1Lm0aBcDe", "code": "1234"}'
```

```json
{ "valid": true, "attempts_left": 0, "status": "approved", "id": "ver_9f2KxQe1Lm0aBcDe", "…": "…" }
```

**Trust only `valid: true`.** It is true once, on the check that approved the code.

## 4. Go live

When your integration works in the sandbox, OTP.ps approves your account and you top up your balance. Then create a **live key** (`otp_live_…`), put it in the same environment variable, and go through the [production checklist](/docs/production-checklist).

## Next

- [Verification lifecycle](/docs/verification-lifecycle): statuses, expiry, tries, resending.
- [Sandbox](/docs/sandbox): test numbers that simulate every outcome.
- Examples: [Node.js](/docs/examples/nodejs), [Next.js](/docs/examples/nextjs), [PHP](/docs/examples/php), [Laravel](/docs/examples/laravel), [Python](/docs/examples/python), [WooCommerce](/docs/examples/woocommerce).
- [API reference](/docs/api-reference) and the [OpenAPI document](/openapi.json).
