Phone Number Verification in Ghana

Verify that a Ghanaian mobile phone number is registered with a carrier and retrieve the subscriber's details.

Prerequisites

You'll need an API key. See API Keys to generate one.

Note: Verification endpoints use an API key in the X-API-Key header — not a Bearer token.


Make the request

Ghana verifications require a networkCode to identify the carrier.

curl -X POST https://api.lira.com/api/v1/verify/phone \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "0241234567",
    "country": "GH",
    "networkCode": "MTN"
  }'

Request fields

Field Type Required Description
phoneNumber string Yes Local Ghanaian phone number
country string Yes Must be GH
networkCode string Yes Carrier code. Supported: MTN, Vodafone, AirtelTigo
mode string No sync (default) or async
webhookUrl string No Required when mode is async

Important: Omitting networkCode for Ghana will return a NETWORK_CODE_REQUIRED error.


Successful response

{
  "id": "ver_b2c3d4e5-...",
  "status": "success",
  "verificationType": "PHONE_NUMBER",
  "identifier": "0241234567",
  "country": "GH",
  "verifiedAt": "2026-03-09T10:06:00.000Z",
  "verified": true,
  "phoneNumber": "0241234567",
  "firstName": "Abena",
  "lastName": "Asante",
  "fullName": "Abena Asante",
  "dateOfBirth": "1992-03-22"
}

Sandbox test data

Phone Number Network Expected result
0200000000 MTN success — returns "Test User GH"

Error codes

error.code Cause Action
SUBSCRIBER_NOT_FOUND Number not registered with the carrier Ask user to verify the number is correct
INVALID_PHONE_NUMBER Invalid format Validate format before submitting
INVALID_NETWORK_CODE Carrier code not recognised Use MTN, Vodafone, or AirtelTigo
NETWORK_CODE_REQUIRED networkCode missing for GH Always include networkCode for Ghana
PROVIDER_ERROR Upstream system error Retry with exponential backoff
PROVIDER_TIMEOUT Upstream system timed out Retry — transient error

Next steps