Skip to main content
GET
Validate Phone Number

Overview

Validates phone numbers for ADSL or 4G services before submission. Helps prevent errors and reduces refund issues.
Always validate phone numbers before submitting top-up requests to minimize failures.

Query Parameters

string
required
Service type: ADSL or 4G
string
required
Phone number to validate - ADSL: 0[0-9]{8} (e.g., 036362608) - 4G: 213[0-9]{9} (e.g., 213472731602)

Response

Valid ADSL Number

Valid 4G Number

Invalid Number

The message is written for the end user and can be shown as-is. ERR_PHONE covers all three cases: the number doesn’t exist at Algérie Télécom, it doesn’t match the type you sent, or AT is temporarily unreachable.

Sandbox

With a sandbox key this endpoint answers from fixtures: no line is contacted at Algérie Télécom, no captcha is solved, and the response is instant. The number decides the answer:
Sandbox: valid number
Use 030000000 to exercise your ERR_PHONE path, and any other valid-format number for the success path. The same numbers carry over to Send Top-Up, where they also decide how the order’s status evolves.

Examples

Phone Number Formats

Format: 0[0-9]{8} Valid Examples: - ✅ 036362608 - ✅ 031417237 - ✅ 021123456 Invalid Examples: - ❌ 36362608 (missing leading 0) - ❌ 0363626081 (too long) - ❌ 213636362608 (wrong format)

Integration Example

Why Validate?

Reduce Errors

Catch invalid numbers before submission

Better UX

Show immediate feedback to users

Fewer Refunds

Minimize failed transactions and refunds

Verify Format

Ensure number matches service type

Best Practices

Validate format client-side first, then confirm with API:
Display clear messages when validation fails: - “Please enter a valid ADSL number (e.g., 036362608)” - “4G numbers should start with 213 (e.g., 213665983439)” - “Number format: 9 digits starting with 0”
Cache successful validations for a short period:

List Products

Get available cards

Send Top-Up

Purchase internet card